kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edmundo Carmona Antoranz <eantoranz@gmail.com>
To: christophe.jaillet@wanadoo.fr, dan.carpenter@oracle.com
Cc: kernel-janitors@vger.kernel.org,
	Edmundo Carmona Antoranz <eantoranz@gmail.com>
Subject: [RFC 2/2] staging: fbtft: use symbolic error messages
Date: Sat,  8 May 2021 18:41:12 -0600	[thread overview]
Message-ID: <20210509004112.421100-2-eantoranz@gmail.com> (raw)
In-Reply-To: <20210509004112.421100-1-eantoranz@gmail.com>

Modify some error messages so that the symbolic error value be
printed instead of a numeric value.
---
 drivers/staging/fbtft/fb_ssd1351.c   | 3 +--
 drivers/staging/fbtft/fb_watterott.c | 3 +--
 drivers/staging/fbtft/fbtft-core.c   | 5 ++---
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/fbtft/fb_ssd1351.c b/drivers/staging/fbtft/fb_ssd1351.c
index 900b28d826b2..adf486b36289 100644
--- a/drivers/staging/fbtft/fb_ssd1351.c
+++ b/drivers/staging/fbtft/fb_ssd1351.c
@@ -223,8 +223,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/fb_watterott.c b/drivers/staging/fbtft/fb_watterott.c
index 76b25df376b8..f9ecc5202c47 100644
--- a/drivers/staging/fbtft/fb_watterott.c
+++ b/drivers/staging/fbtft/fb_watterott.c
@@ -263,8 +263,7 @@ static void register_chip_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 4f362dad4436..4d96ab2ea71c 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -83,7 +83,7 @@ static int fbtft_request_one_gpio(struct fbtft_par *par,
 	if (IS_ERR(*gpiop)) {
 		ret = PTR_ERR(*gpiop);
 		dev_err(dev,
-			"Failed to request %s GPIO: %d\n", name, ret);
+			"Failed to request %s GPIO: %pe\n", name, *gpiop);
 		return ret;
 	}
 	fbtft_par_dbg(DEBUG_REQUEST_GPIOS, par, "%s: '%s' GPIO\n",
@@ -194,8 +194,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.30.2


  reply	other threads:[~2021-05-09  0:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-09  0:41 [RFC 1/2] rtc: max77686: use symbolic error messages Edmundo Carmona Antoranz
2021-05-09  0:41 ` Edmundo Carmona Antoranz [this message]
2021-05-09  0:44   ` [RFC 2/2] staging: fbtft: " Edmundo Carmona Antoranz
2021-05-09  7:39 ` [RFC 1/2] rtc: max77686: " Christophe JAILLET
2021-05-10  4:30 ` Dan Carpenter
2021-05-10  5:06   ` Julia Lawall
2021-05-10  5:45     ` Marion & Christophe JAILLET
     [not found] ` <alpine.DEB.2.22.394.2105092315330.24280@hadrien>
2021-05-10  4:35   ` Dan Carpenter
2021-05-10  5:03     ` Julia Lawall
2021-05-10  6:03       ` Dan Carpenter
2021-05-10  6:04         ` Julia Lawall

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=20210509004112.421100-2-eantoranz@gmail.com \
    --to=eantoranz@gmail.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).