summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-02-18 15:16:34 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-02-19 08:54:09 +0100
commit10191923f1197b5922d07fbf5f8b1929245bd825 (patch)
treebdfb145735ea030778511a2f9f9e351c8794689b /drivers
parent57974c2d8b2c180f51d4fe263b35b2b74478a235 (diff)
downloadbarebox-10191923f1197b5922d07fbf5f8b1929245bd825.tar.gz
barebox-10191923f1197b5922d07fbf5f8b1929245bd825.tar.xz
gpiolib: use correct format specifier for ptrdiff_t
C99 specifies the 't' length modifier type for pointer difference. barebox vsnprintf supports it, thus use it. We are guaranteed sizeof(long) == sizeof(void *) in barebox, so this doesn't make a difference in practice except that it silences following GCC warning: ./drivers/gpio/gpiolib.c: In function 'gpioinfo_request': ./include/printk.h:77:43: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'int' [-Wformat=] ... ./barebox-stm32/drivers/gpio/gpiolib.c:89:3: note: in expansion of macro 'pr_err' 89 | pr_err("_gpio_request: gpio-%ld (%s) status %d\n", Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/gpiolib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index cfa77360b3..27674af54c 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -86,7 +86,7 @@ static int gpioinfo_request(struct gpio_info *gi, const char *label)
done:
if (ret)
- pr_err("_gpio_request: gpio-%ld (%s) status %d\n",
+ pr_err("_gpio_request: gpio-%td (%s) status %d\n",
gi - gpio_desc, label ? : "?", ret);
return ret;