[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190824233724.1775-2-uwe@kleine-koenig.org>
Date: Sun, 25 Aug 2019 01:37:24 +0200
From: Uwe Kleine-König <uwe@...ine-koenig.org>
To: Andrew Morton <akpm@...ux-foundation.org>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>
Cc: Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org
Subject: [PATCH v1 2/2] gpiolib: print an error name instead of a plain number in error string
This is an example that makes use of the just introduced printk format
%dE that prints (e.g.) "EIO" when the matching integer is -EIO (or EIO).
Signed-off-by: Uwe Kleine-König <uwe@...ine-koenig.org>
---
drivers/gpio/gpiolib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index f497003f119c..b50ea24f087f 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1247,7 +1247,7 @@ static void gpiochip_setup_devs(void)
list_for_each_entry(gdev, &gpio_devices, list) {
err = gpiochip_setup_dev(gdev);
if (err)
- pr_err("%s: Failed to initialize gpio device (%d)\n",
+ pr_err("%s: Failed to initialize gpio device (%dE)\n",
dev_name(&gdev->dev), err);
}
}
--
2.20.1
Powered by blists - more mailing lists