Search Linux Wireless

Re: sparse warnings on iwlwifi

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

 



On Thu, 2008-07-10 at 13:45 +0300, Tomas Winkler wrote:
> On Thu, Jul 10, 2008 at 12:10 PM, Johannes Berg
> <johannes@xxxxxxxxxxxxxxxx> wrote:
> > Was just running sparse for something unrelated and noticed these:
> >
> > drivers/net/wireless/iwlwifi/iwl-rx.c:832:2: warning: cast truncates bits from constant value (1c00 becomes 0)
> > drivers/net/wireless/iwlwifi/iwl-rx.c:836:2: warning: cast truncates bits from constant value (6f080000 becomes 0)
> > drivers/net/wireless/iwlwifi/iwl-rx.c:836:2: warning: cast truncates bits from constant value (6f080000 becomes 0)
> > drivers/net/wireless/iwlwifi/iwl-rx.c:856:3: warning: cast truncates bits from constant value (4001 becomes 1)
> > drivers/net/wireless/iwlwifi/iwl-rx.c:860:3: warning: cast truncates bits from constant value (a000 becomes 0)
> > drivers/net/wireless/iwlwifi/iwl-rx.c:864:3: warning: cast truncates bits from constant value (c000 becomes 0)
> 
> Yeah I've actually wanted to ask someone how to solve. This comes from
> radio tap code, frankly currently very low priority on my list.
> Not sure why but only calling directly to put_unalinged_le32 fixes
> this warning. In general put_unaligned should be expanded to this
> macro.

Yeah I was also just looking at it and couldn't make sense of it. It
seems sparse gets confused about the pointer type or something.

> I will submit patch that solves this.

Cool, thanks.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[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