* [PATCH v1 1/1] hwmon: (sch5636) Print unknown ID in error string via %*pE
@ 2024-09-11 20:19 Andy Shevchenko
2024-09-12 21:27 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2024-09-11 20:19 UTC (permalink / raw)
To: linux-hwmon, linux-kernel; +Cc: Jean Delvare, Guenter Roeck, Andy Shevchenko
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>
---
drivers/hwmon/sch5636.c | 3 +--
1 file changed, 1 insertion(+), 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;
}
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] hwmon: (sch5636) Print unknown ID in error string via %*pE
2024-09-11 20:19 [PATCH v1 1/1] hwmon: (sch5636) Print unknown ID in error string via %*pE Andy Shevchenko
@ 2024-09-12 21:27 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2024-09-12 21:27 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-hwmon, linux-kernel, Jean Delvare
On Wed, Sep 11, 2024 at 11:19:03PM +0300, Andy Shevchenko wrote:
> 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>
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-12 21:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-11 20:19 [PATCH v1 1/1] hwmon: (sch5636) Print unknown ID in error string via %*pE Andy Shevchenko
2024-09-12 21:27 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox