]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
rtl8180: silence "dubious: x | !y" sparse warning
authorJohn W. Linville <linville@tuxdriver.com>
Wed, 21 Jul 2010 20:36:06 +0000 (16:36 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 26 Jul 2010 19:09:03 +0000 (15:09 -0400)
  CHECK   drivers/net/wireless/rtl818x/rtl8180_rtl8225.c
drivers/net/wireless/rtl818x/rtl8180_rtl8225.c:53:33: warning: dubious: x | !y

The existing code is clever and works fine, but it's not worth even a
single line of Sparse warning SPAM...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtl818x/rtl8180_rtl8225.c

index 4d2be0d9672b58b529ab6570f5c940a6bb78c9ad..69e4d4745dae76c4c00d719a51d9a320e941b917 100644 (file)
@@ -50,7 +50,10 @@ static void rtl8225_write(struct ieee80211_hw *dev, u8 addr, u16 data)
        udelay(10);
 
        for (i = 15; i >= 0; i--) {
-               u16 reg = reg80 | !!(bangdata & (1 << i));
+               u16 reg = reg80;
+
+               if (bangdata & (1 << i))
+                       reg |= 1;
 
                if (i & 1)
                        rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg);