]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: fbtft: Use %pe format specifier for error pointers
authorMahad Ibrahim <mahad.ibrahim.dev@gmail.com>
Sun, 12 Apr 2026 14:45:52 +0000 (10:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Apr 2026 11:01:56 +0000 (05:01 -0600)
The %pe format specifier resolves error pointers to their symbolic
representation. Previously %ld with PTR_ERR() was being used, %pe is a
better alternative.

Fixes the following coccinelle warnings reported by coccicheck:
WARNING: Consider using %pe to print PTR_ERR()

Testing: I do not own the hardware, therefore I could not perform
hardware testing. Compile tested only.

Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com>
Link: https://patch.msgid.link/20260412144552.18493-1-mahad.ibrahim.dev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fb_ssd1351.c
drivers/staging/fbtft/fbtft-core.c

index 6736b09b2f458cd0ad97374b3604e264cb90e160..15524b80035a168dd9369acff89d1fc93c06b48c 100644 (file)
@@ -218,8 +218,7 @@ static void register_onboard_backlight(struct fbtft_par *par)
                                       &bl_props);
        if (IS_ERR(bd)) {
                dev_err(par->info->device,
-                       "cannot register backlight device (%ld)\n",
-                       PTR_ERR(bd));
+                       "cannot register backlight device (%pe)\n", bd);
                return;
        }
        par->info->bl_dev = bd;
index 3da42c8ca6e331e51327f9977c97a24787c818d3..ca0c38221c16bb88b7553c0bb343cbd7c4a53c7d 100644 (file)
@@ -187,8 +187,7 @@ void fbtft_register_backlight(struct fbtft_par *par)
                                       &fbtft_bl_ops, &bl_props);
        if (IS_ERR(bd)) {
                dev_err(par->info->device,
-                       "cannot register backlight device (%ld)\n",
-                       PTR_ERR(bd));
+                       "cannot register backlight device (%pe)\n", bd);
                return;
        }
        par->info->bl_dev = bd;