Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1578539
| From | Larry Finger <Larry.Finger@lwfinger.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] staging: r8712u: remove unnecessary le32_to_cpu |
| Date | 2017-02-10 16:10 +0100 |
| Message-ID | <t9kZI-52n-23@gated-at.bofh.it> (permalink) |
| References | <t9b0m-71o-13@gated-at.bofh.it> <t9k3E-4oZ-9@gated-at.bofh.it> <t9kQ2-4Jf-23@gated-at.bofh.it> <t9kQ3-4Jf-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 02/10/2017 08:58 AM, Greg KH wrote: > 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? My recollection is that a number of patches had been submitted to clean up the endian warnings, but I do not remember the details. I will try to reproduce those again, and get them resubmitted to clean up the warnings in a manner that does not break the driver. I do have a BE machine for testing. Larry
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] staging: r8712u: remove unnecessary le32_to_cpu Perry Hooker <perry.hooker@gmail.com> - 2017-02-10 05:30 +0100
Re: [PATCH] staging: r8712u: remove unnecessary le32_to_cpu Greg KH <gregkh@linuxfoundation.org> - 2017-02-10 15:10 +0100
Re: [PATCH] staging: r8712u: remove unnecessary le32_to_cpu Larry Finger <Larry.Finger@lwfinger.net> - 2017-02-10 16:00 +0100
Re: [PATCH] staging: r8712u: remove unnecessary le32_to_cpu Greg KH <gregkh@linuxfoundation.org> - 2017-02-10 16:00 +0100
Re: [PATCH] staging: r8712u: remove unnecessary le32_to_cpu Larry Finger <Larry.Finger@lwfinger.net> - 2017-02-10 16:10 +0100
Re: [PATCH] staging: r8712u: remove unnecessary le32_to_cpu Perry Hooker <perry.hooker@gmail.com> - 2017-02-10 20:00 +0100
[PATCH] staging: r8712u: use __le32 type for little-endian data Perry Hooker <perry.hooker@gmail.com> - 2017-02-10 20:30 +0100
Re: [PATCH] staging: r8712u: use __le32 type for little-endian data Larry Finger <Larry.Finger@lwfinger.net> - 2017-02-10 22:00 +0100
Re: [PATCH] staging: r8712u: use __le32 type for little-endian data Perry Hooker <perry.hooker@gmail.com> - 2017-02-11 20:10 +0100
csiph-web