Re: [PATCH 1/3] gpiolib: use correct format specifier for ptrdiff_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 18, 2020 at 03:16:34PM +0100, Ahmad Fatoum wrote:
> 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@xxxxxxxxxxxxxx>
> ---
>  drivers/gpio/gpiolib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux