Search Linux Wireless

Re: [PATCH] b43: Fix sparse warnings

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

 



On Fri, 2009-08-14 at 23:04 +0200, Gábor Stefanik wrote:
> On Fri, Aug 14, 2009 at 11:00 PM, Michael Buesch<mb@xxxxxxxxx> wrote:
> > On Friday 14 August 2009 22:52:13 Pavel Roskin wrote:
> >> On Fri, 2009-08-14 at 22:15 +0200, Michael Buesch wrote:
> >>
> >> > > -                 b43_phy_mask(dev, 0x048A, (u16)~0x8000);
> >> > > +                 b43_phy_mask(dev, 0x048A, (u16)(~0x8000 & 0xFFFF));
> >> >
> >
> >> I would just use 0x7fff here.
> >
> > That does not work if 0x8000 is a #defined bit.
> 
> What about ~((u16)0x8000)?

phy_g.c:974: warning: large integer implicitly truncated to unsigned
type

>  (Or maybe ~(u16)0x8000 is enough, without
> the extra parentheses.)

Same thing.  Sparse complains whether the cast is explicit or implicit.

-- 
Regards,
Pavel Roskin
--
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