From: Andy Shevchenko Date: Wed, 11 Sep 2024 20:19:03 +0000 (+0300) Subject: hwmon: (sch5636) Print unknown ID in error string via %*pE X-Git-Tag: v6.12-rc1~150^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3017d28d6c0fe995703a1f34275e1cade424dc35;p=thirdparty%2Flinux.git hwmon: (sch5636) Print unknown ID in error string via %*pE Instead of custom approach this allows to print escaped strings via %*pE extension. With this the unknown ID will be printed as a string. Nonetheless, leave hex values to be printed as well. Signed-off-by: Andy Shevchenko Message-ID: <20240911201903.2886874-1-andriy.shevchenko@linux.intel.com> Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/sch5636.c b/drivers/hwmon/sch5636.c index 6e6d541584746..a4b05ebb05460 100644 --- a/drivers/hwmon/sch5636.c +++ b/drivers/hwmon/sch5636.c @@ -416,8 +416,7 @@ static int sch5636_probe(struct platform_device *pdev) id[i] = '\0'; if (strcmp(id, "THS")) { - pr_err("Unknown Fujitsu id: %02x%02x%02x\n", - id[0], id[1], id[2]); + pr_err("Unknown Fujitsu id: %3pE (%3ph)\n", id, id); err = -ENODEV; goto error; }