From: Keefe Reeves <reeveskeefe@gmail.com>
To: andy@kernel.org, gregkh@linuxfoundation.org
Cc: abdun.nihaal@gmail.com, error27@gmail.com, chintanlike@gmail.com,
namcao@linutronix.de, niejianglei2021@163.com,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Keefe Reeves <reeveskeefe@gmail.com>
Subject: [PATCH v2] staging: fbtft: use %pe for backlight errors
Date: Sun, 14 Jun 2026 17:15:51 -0300 [thread overview]
Message-ID: <20260614201551.20542-1-reeveskeefe@gmail.com> (raw)
Coccinelle found two places where backlight registration errors are
printed by passing PTR_ERR() to dev_err().
Use %pe instead so the error pointer can be printed directly. This keeps
the behavior the same and just makes the error printing cleaner.
Signed-off-by: Keefe Reeves <reeveskeefe@gmail.com>
---
Changes in v2:
- Use reachable Gmail address for author and Signed-off-by.
drivers/staging/fbtft/fb_ssd1351.c | 4 ++--
drivers/staging/fbtft/fbtft-core.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/fbtft/fb_ssd1351.c b/drivers/staging/fbtft/fb_ssd1351.c
index 6736b09b2f45..b6cb60f20b11 100644
--- a/drivers/staging/fbtft/fb_ssd1351.c
+++ b/drivers/staging/fbtft/fb_ssd1351.c
@@ -218,8 +218,8 @@ 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 3da42c8ca6e3..b6a846ada3e0 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -187,8 +187,8 @@ 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.54.0
next reply other threads:[~2026-06-15 7:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-14 20:15 Keefe Reeves [this message]
2026-06-15 7:11 ` [PATCH v2] staging: fbtft: use %pe for backlight errors Andy Shevchenko
2026-07-07 9:22 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260614201551.20542-1-reeveskeefe@gmail.com \
--to=reeveskeefe@gmail.com \
--cc=abdun.nihaal@gmail.com \
--cc=andy@kernel.org \
--cc=chintanlike@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=namcao@linutronix.de \
--cc=niejianglei2021@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.