Search Linux Wireless

Re: [PATCH for-2.6.38] p54pci: update receive dma buffers before and after processing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux