diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2023-05-09 13:53:25 +0200 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-05-12 03:15:42 +0200 |
commit | 4d702a5399dc9d461fc1f0fd566e656f9a7efd48 (patch) | |
tree | a737463d0a4879b285b38159fc673a75a7c4d0e5 /target/linux/ath79 | |
parent | 2f9bc747cbbb978d1e7024d3bb89d1761d8336f6 (diff) | |
download | upstream-4d702a5399dc9d461fc1f0fd566e656f9a7efd48.tar.gz upstream-4d702a5399dc9d461fc1f0fd566e656f9a7efd48.tar.bz2 upstream-4d702a5399dc9d461fc1f0fd566e656f9a7efd48.zip |
ath79: gpio-latch: fix compilation warning for wrong dev_err %
Fix compilation warning for using %d instead of %ld for gpio-latch in
dev_err.
Fix compilation warning:
In file included from ./include/linux/device.h:15,
from ./include/linux/gpio/driver.h:5,
from drivers/gpio/gpio-latch.c:13:
drivers/gpio/gpio-latch.c: In function 'gpio_latch_probe':
drivers/gpio/gpio-latch.c:137:46: error: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Werror=format=]
137 | dev_err(dev, "failed to get gpio %d: %d\n", i,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
./include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/gpio/gpio-latch.c:137:33: note: in expansion of macro 'dev_err'
137 | dev_err(dev, "failed to get gpio %d: %d\n", i,
| ^~~~~~~
drivers/gpio/gpio-latch.c:137:71: note: format string is defined here
137 | dev_err(dev, "failed to get gpio %d: %d\n", i,
| ~^
| |
| int
| %ld
cc1: all warnings being treated as errors
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'target/linux/ath79')
-rw-r--r-- | target/linux/ath79/files/drivers/gpio/gpio-latch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/ath79/files/drivers/gpio/gpio-latch.c b/target/linux/ath79/files/drivers/gpio/gpio-latch.c index 976e683230..68f9290b2a 100644 --- a/target/linux/ath79/files/drivers/gpio/gpio-latch.c +++ b/target/linux/ath79/files/drivers/gpio/gpio-latch.c @@ -134,7 +134,7 @@ static int gpio_latch_probe(struct platform_device *pdev) GPIOD_OUT_LOW); if (IS_ERR(glc->gpios[i])) { if (PTR_ERR(glc->gpios[i]) != -EPROBE_DEFER) { - dev_err(dev, "failed to get gpio %d: %d\n", i, + dev_err(dev, "failed to get gpio %d: %ld\n", i, PTR_ERR(glc->gpios[i])); } return PTR_ERR(glc->gpios[i]); |