Skip to content

Commit

Permalink
WAN: dscc4: Fix warning pointing out a bug.
Browse files Browse the repository at this point in the history
Noticed by Stephen Rothwell:

	Today's linux-next build (x86_64 allmodconfig gcc-4.4.0)
	produced this warning:

	drivers/net/wan/dscc4.c: In function 'dscc4_rx_skb':
	drivers/net/wan/dscc4.c:670: warning: suggest parentheses around comparison in operand of '|'

	which actually points out a bug, I think.  It is doing
		(x & (y | z)) != y | z
	when it probably means
		(x & (y | z)) != (y | z)

	Introduced by commit 5de3fca
	("WAN: bit and/or confusion").

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Sep 4, 2009
1 parent a8fdf2b commit fab4e76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wan/dscc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ static inline void dscc4_rx_skb(struct dscc4_dev_priv *dpriv,
else if (!(skb->data[pkt_len] & FrameCrc))
dev->stats.rx_crc_errors++;
else if ((skb->data[pkt_len] & (FrameVfr | FrameRab)) !=
FrameVfr | FrameRab)
(FrameVfr | FrameRab))
dev->stats.rx_length_errors++;
dev->stats.rx_errors++;
dev_kfree_skb_irq(skb);
Expand Down

0 comments on commit fab4e76

Please sign in to comment.