[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdXkdNCyNQyWEPEzTYScwqTfv9z_RzFcJDy7VySeiZEmdw@mail.gmail.com>
Date: Tue, 15 Oct 2019 18:45:13 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: "Ben Dooks (Codethink)" <ben.dooks@...ethink.co.uk>
Cc: linux-kernel@...ts.codethink.co.uk,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
Simon Horman <horms+renesas@...ge.net.au>,
Geert Uytterhoeven <geert+renesas@...der.be>,
USB list <linux-usb@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: renesas_usbhs: fix __le16 warnings
On Tue, Oct 15, 2019 at 5:50 PM Ben Dooks (Codethink)
<ben.dooks@...ethink.co.uk> wrote:
> Fix the warnings generated by casting to/from __le16 without
> using the correct functions.
>
> Fixes the following sparse warnings:
>
> drivers/usb/renesas_usbhs/common.c:165:25: warning: incorrect type in assignment (different base types)
> drivers/usb/renesas_usbhs/common.c:165:25: expected restricted __le16 [usertype] wValue
> drivers/usb/renesas_usbhs/common.c:165:25: got unsigned short
> drivers/usb/renesas_usbhs/common.c:166:25: warning: incorrect type in assignment (different base types)
> drivers/usb/renesas_usbhs/common.c:166:25: expected restricted __le16 [usertype] wIndex
> drivers/usb/renesas_usbhs/common.c:166:25: got unsigned short
> drivers/usb/renesas_usbhs/common.c:167:25: warning: incorrect type in assignment (different base types)
> drivers/usb/renesas_usbhs/common.c:167:25: expected restricted __le16 [usertype] wLength
> drivers/usb/renesas_usbhs/common.c:167:25: got unsigned short
> drivers/usb/renesas_usbhs/common.c:173:39: warning: incorrect type in argument 3 (different base types)
> drivers/usb/renesas_usbhs/common.c:173:39: expected unsigned short [usertype] data
> drivers/usb/renesas_usbhs/common.c:173:39: got restricted __le16 [usertype] wValue
> drivers/usb/renesas_usbhs/common.c:174:39: warning: incorrect type in argument 3 (different base types)
> drivers/usb/renesas_usbhs/common.c:174:39: expected unsigned short [usertype] data
> drivers/usb/renesas_usbhs/common.c:174:39: got restricted __le16 [usertype] wIndex
> drivers/usb/renesas_usbhs/common.c:175:39: warning: incorrect type in argument 3 (different base types)
> drivers/usb/renesas_usbhs/common.c:175:39: expected unsigned short [usertype] data
>
> Note. I belive this to be correct, and should be a no-op on arm.
Yep, the affected platforms are little-endian.
> Signed-off-by: Ben Dooks <ben.dooks@...ethink.co.uk>
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists