[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200713.170338.67090817978996414.davem@davemloft.net>
Date: Mon, 13 Jul 2020 17:03:38 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: geert@...ux-m68k.org
Cc: kuba@...nel.org, gregkh@...uxfoundation.org,
linux-usb@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: hso: Fix debug compile warning on sparc32
From: Geert Uytterhoeven <geert@...ux-m68k.org>
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@...ux-m68k.org>
Applied, thanks.
Powered by blists - more mailing lists