From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753360AbdBJO6f (ORCPT ); Fri, 10 Feb 2017 09:58:35 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:35880 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752252AbdBJO6e (ORCPT ); Fri, 10 Feb 2017 09:58:34 -0500 Date: Fri, 10 Feb 2017 15:58:32 +0100 From: Greg KH To: Larry Finger Cc: Perry Hooker , devel@driverdev.osuosl.org, florian.c.schilhabel@googlemail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: r8712u: remove unnecessary le32_to_cpu Message-ID: <20170210145832.GA30536@kroah.com> References: <1486698715-81145-1-git-send-email-perry.hooker@gmail.com> <20170210140822.GC7136@kroah.com> <1de09539-fc74-5caa-4b57-8384dff5060a@lwfinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1de09539-fc74-5caa-4b57-8384dff5060a@lwfinger.net> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > > --- > > > 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