Search Linux Wireless

Re: [PATCH] b43: silense most sparse warnings

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

 



On Wed, Jul 21, 2010 at 11:48:05AM -0500, Larry Finger wrote:
> On 07/21/2010 11:05 AM, Michael Büsch wrote:
> >On 07/21/2010 05:45 PM, John W. Linville wrote:
> >>diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
> >>index 29bf34c..0dc33b6 100644
> >>--- a/drivers/net/wireless/b43/phy_g.c
> >>+++ b/drivers/net/wireless/b43/phy_g.c
> >>@@ -972,7 +972,7 @@ b43_radio_interference_mitigation_enable(struct b43_wldev
> >>*dev, int mode)
> >>b43_phy_maskset(dev, 0x04A2, 0xFFF0, 0x000B);
> >>
> >>if (phy->rev>= 3) {
> >>- b43_phy_mask(dev, 0x048A, (u16)~0x8000);
> >>+ b43_phy_mask(dev, 0x048A, 0x7FFF);
> >
> >This cast was introduced to silense a GCC warning. Do we end up in an
> >infinite loop now? ;)
> 
> I get no GCC warnings here with the change. I think it is OK.
> 
> Is silense a valid British spelling? I prefer silence.

Just a typo. :-)

> Do you wish to clean up the warnings from the N-PHY code as well?
> Ignoring the "should it be static?" parts, I get the following
> sparse warnings:
> 
> drivers/net/wireless/b43/phy_n.c:512:53: warning: cast truncates
> bits from constant value (ffff0fff becomes fff)
> drivers/net/wireless/b43/phy_n.c:765:66: warning: cast truncates
> bits from constant value (ffff7fff becomes 7fff)
> drivers/net/wireless/b43/phy_n.c:1012:38: warning: cast truncates
> bits from constant value (ffff00ff becomes ff)
> drivers/net/wireless/b43/phy_n.c:1119:38: warning: cast truncates
> bits from constant value (ffff0fff becomes fff)
> drivers/net/wireless/b43/phy_n.c:2458:56: warning: cast truncates
> bits from constant value (ffff7fff becomes 7fff)
> drivers/net/wireless/b43/phy_n.c:2933:38: warning: cast truncates
> bits from constant value (ffff0fff becomes fff)
> drivers/net/wireless/b43/phy_n.c:3294:57: warning: cast truncates
> bits from constant value (ffff3fff becomes 3fff)
> 
> The patch for them is below.

Seems fine -- shall I add your Signed-off-by?

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@xxxxxxxxxxxxx			might be all we have.  Be ready.
--
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