]> Git Repo - J-linux.git/commitdiff
hwmon: (sch5636) Print unknown ID in error string via %*pE
authorAndy Shevchenko <[email protected]>
Wed, 11 Sep 2024 20:19:03 +0000 (23:19 +0300)
committerGuenter Roeck <[email protected]>
Thu, 12 Sep 2024 21:27:37 +0000 (14:27 -0700)
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: <20240911201903.2886874[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
drivers/hwmon/sch5636.c

index 6e6d54158474631e7efa8873790d6b10376575fc..a4b05ebb054609b2e363913dc2c27d28fe509161 100644 (file)
@@ -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;
        }
This page took 0.055844 seconds and 4 git commands to generate.