Return-path: Received: from mail-bw0-f46.google.com ([209.85.214.46]:56522 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751453Ab1BKMFc (ORCPT ); Fri, 11 Feb 2011 07:05:32 -0500 Received: by bwz15 with SMTP id 15so3126414bwz.19 for ; Fri, 11 Feb 2011 04:05:31 -0800 (PST) From: Christian Lamparter To: Larry Finger Subject: Re: [PATCH for-2.6.38] p54pci: update receive dma buffers before and after processing Date: Fri, 11 Feb 2011 13:05:30 +0100 Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com References: <201102110148.43155.chunkeey@googlemail.com> <4D5492BC.4030104@lwfinger.net> In-Reply-To: <4D5492BC.4030104@lwfinger.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Message-Id: <201102111305.30920.chunkeey@googlemail.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: On Friday 11 February 2011 02:37:00 Larry Finger wrote: > On 02/10/2011 06:48 PM, Christian Lamparter wrote: > > --- > > diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c > > index 1eacba4..0494d7b 100644 > > --- a/drivers/net/wireless/p54/p54pci.c > > +++ b/drivers/net/wireless/p54/p54pci.c > > @@ -216,17 +217,20 @@ static void p54p_check_rx_ring(struct ieee80211_hw *dev, u32 *index, > > rx_buf[i] = NULL; > > - desc->host_addr = 0; > > + desc->host_addr = cpu_to_le32(0); > > How does a BE zero differ from a LE zero? As far as I can know "0" is something like an endian palindrome. Otherwise [non-NULL] we would have fixed this long ago, because then a warning is generated by "sparse": drivers/net/wireless/p54/p54pci.c:229:20: warning: incorrect type in assignment (different base types) drivers/net/wireless/p54/p54pci.c:229:20: expected restricted __le32 [usertype] host_addr drivers/net/wireless/p54/p54pci.c:229:20: got int > Using it this way emphasizes that it needs to be translated - > I'm not objecting, just curious. Furthermore the compiler optimizes *constant* cpu_to_le [and vice versa] conversions, so there's no hidden cost from using them. Regards, Chr