* [PATCH] staging: fbtft: Use %pe format specifier for error pointers
@ 2026-04-12 14:45 Mahad Ibrahim
0 siblings, 0 replies; only message in thread
From: Mahad Ibrahim @ 2026-04-12 14:45 UTC (permalink / raw)
To: Andy Shevchenko, Greg Kroah-Hartman
Cc: Shuah Khan, linux-kernel-mentees, dri-devel, linux-fbdev,
linux-staging, linux-kernel, Mahad Ibrahim
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>
---
drivers/staging/fbtft/fb_ssd1351.c | 3 +--
drivers/staging/fbtft/fbtft-core.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/fbtft/fb_ssd1351.c b/drivers/staging/fbtft/fb_ssd1351.c
index 6736b09b2f45..15524b80035a 100644
--- a/drivers/staging/fbtft/fb_ssd1351.c
+++ b/drivers/staging/fbtft/fb_ssd1351.c
@@ -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;
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index f427c0914907..823315dfbf5d 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -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;
--
2.39.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-12 14:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-12 14:45 [PATCH] staging: fbtft: Use %pe format specifier for error pointers Mahad Ibrahim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox