Skip to content

Commit 3017d28

Browse files
andy-shevgroeck
authored andcommitted
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 <[email protected]> Message-ID: <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
1 parent 38f9fa3 commit 3017d28

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/hwmon/sch5636.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,7 @@ static int sch5636_probe(struct platform_device *pdev)
416416
id[i] = '\0';
417417

418418
if (strcmp(id, "THS")) {
419-
pr_err("Unknown Fujitsu id: %02x%02x%02x\n",
420-
id[0], id[1], id[2]);
419+
pr_err("Unknown Fujitsu id: %3pE (%3ph)\n", id, id);
421420
err = -ENODEV;
422421
goto error;
423422
}

0 commit comments

Comments
 (0)