Skip to content

Commit

Permalink
rtl8180: silence "dubious: x | !y" sparse warning
Browse files Browse the repository at this point in the history
  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>
  • Loading branch information
John W. Linville committed Jul 26, 2010
1 parent 8b73fb8 commit 28eb3e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/wireless/rtl818x/rtl8180_rtl8225.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 28eb3e5

Please sign in to comment.