public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Perry Hooker <perry.hooker@gmail.com>,
	devel@driverdev.osuosl.org, florian.c.schilhabel@googlemail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: r8712u: remove unnecessary le32_to_cpu
Date: Fri, 10 Feb 2017 15:58:32 +0100	[thread overview]
Message-ID: <20170210145832.GA30536@kroah.com> (raw)
In-Reply-To: <1de09539-fc74-5caa-4b57-8384dff5060a@lwfinger.net>

On Fri, Feb 10, 2017 at 08:52:12AM -0600, Larry Finger wrote:
> On 02/10/2017 08:08 AM, Greg KH wrote:
> > On Thu, Feb 09, 2017 at 08:51:55PM -0700, Perry Hooker wrote:
> > > This patch fixes the following sparse warning:
> > > drivers/staging/rtl8712/usb_ops_linux.c:212:33: warning: cast to restricted __le32
> > > 
> > > Signed-off-by: Perry Hooker <perry.hooker@gmail.com>
> > > ---
> > >  drivers/staging/rtl8712/usb_ops_linux.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Does not apply to my tree :(
> 
> That is good. Yes the patch silenced the Sparse warning, but it would BREAK
> the driver on every big-endian machine. Variable pbuf is a pointer to a
> string of bytes *in little-endian order* that is to be converted into a
> cpu-ordered 32-bit quantity. The correct way to silence the warning is to
> make sure the compiler understands what *(pbuf + 1) really is.
> 
> BTW, that driver has been tested on BE hardware. Please be careful about
> endian changes.
> 
> NACK.

Care to comment this somehow so that I don't accidentally take a patch
for this in the future?

thanks,

greg k-h

  reply	other threads:[~2017-02-10 14:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-10  3:51 [PATCH] staging: r8712u: remove unnecessary le32_to_cpu Perry Hooker
2017-02-10 14:08 ` Greg KH
2017-02-10 14:52   ` Larry Finger
2017-02-10 14:58     ` Greg KH [this message]
2017-02-10 15:07       ` Larry Finger
2017-02-10 18:24         ` Perry Hooker
2017-02-10 18:23     ` [PATCH] staging: r8712u: use __le32 type for little-endian data Perry Hooker
2017-02-10 20:55       ` Larry Finger
2017-02-11 19:04         ` Perry Hooker

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=20170210145832.GA30536@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=florian.c.schilhabel@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perry.hooker@gmail.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