Re: [PATCH] usb: hso: Fix debug compile warning on sparc32

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

 



From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Date: Mon, 13 Jul 2020 13:05:13 +0200

> On sparc32, tcflag_t is "unsigned long", unlike on all other
> architectures, where it is "unsigned int":
> 
>     drivers/net/usb/hso.c: In function ʽhso_serial_set_termiosʼ:
>     include/linux/kern_levels.h:5:18: warning: format ʽ%dʼ expects argument of type ʽunsigned intʼ, but argument 4 has type ʽtcflag_t {aka long unsigned int}ʼ [-Wformat=]
>     drivers/net/usb/hso.c:1393:3: note: in expansion of macro ʽhso_dbgʼ
>        hso_dbg(0x16, "Termios called with: cflags new[%d] - old[%d]\n",
>        ^~~~~~~
>     include/linux/kern_levels.h:5:18: warning: format ʽ%dʼ expects argument of type ʽunsigned intʼ, but argument 5 has type ʽtcflag_t {aka long unsigned int}ʼ [-Wformat=]
>     drivers/net/usb/hso.c:1393:3: note: in expansion of macro ʽhso_dbgʼ
>        hso_dbg(0x16, "Termios called with: cflags new[%d] - old[%d]\n",
>        ^~~~~~~
> 
> As "unsigned long" is 32-bit on sparc32, fix this by casting all tcflag_t
> parameters to "unsigned int".
> While at it, use "%u" to format unsigned numbers.
> 
> Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

Applied, thanks.




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux