diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-09-11 23:19:03 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2024-09-12 14:27:37 -0700 |
commit | 3017d28d6c0fe995703a1f34275e1cade424dc35 (patch) | |
tree | 7a585acd9111af505a726b1c3c6d9fb00b6dffd4 | |
parent | 38f9fa39afe119f6b2771c9065e638414226c86d (diff) |
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 <andriy.shevchenko@linux.intel.com>
Message-ID: <20240911201903.2886874-1-andriy.shevchenko@linux.intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r-- | drivers/hwmon/sch5636.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hwmon/sch5636.c b/drivers/hwmon/sch5636.c index 6e6d54158474..a4b05ebb0546 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; } |