linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: "Ben Dooks (Codethink)" <ben.dooks@codethink.co.uk>
Cc: linux-kernel@lists.codethink.co.uk,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Simon Horman <horms+renesas@verge.net.au>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	USB list <linux-usb@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: renesas_usbhs: fix __le16 warnings
Date: Tue, 15 Oct 2019 18:45:13 +0200	[thread overview]
Message-ID: <CAMuHMdXkdNCyNQyWEPEzTYScwqTfv9z_RzFcJDy7VySeiZEmdw@mail.gmail.com> (raw)
In-Reply-To: <20191015155044.11858-1-ben.dooks@codethink.co.uk>

On Tue, Oct 15, 2019 at 5:50 PM Ben Dooks (Codethink)
<ben.dooks@codethink.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@codethink.co.uk>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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

  reply	other threads:[~2019-10-15 16:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 15:50 [PATCH] usb: renesas_usbhs: fix __le16 warnings Ben Dooks (Codethink)
2019-10-15 16:45 ` Geert Uytterhoeven [this message]
2019-10-16  2:35 ` Yoshihiro Shimoda
2019-10-16 12:26 ` Simon Horman
2019-10-17  2:18   ` Yoshihiro Shimoda
2019-10-17  6:57     ` Geert Uytterhoeven
2019-10-17 10:00       ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMuHMdXkdNCyNQyWEPEzTYScwqTfv9z_RzFcJDy7VySeiZEmdw@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=ben.dooks@codethink.co.uk \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=horms+renesas@verge.net.au \
    --cc=linux-kernel@lists.codethink.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).