commit | 2c1bbbffa0b644fab4f91878cde0c2e8f52e2dcc | [log] [tgz] |
---|---|---|
author | Chen Gang <gang.chen@asianux.com> | Thu Apr 25 00:49:55 2013 +0000 |
committer | David S. Miller <davem@davemloft.net> | Mon Apr 29 12:29:04 2013 -0400 |
tree | 2b9efab1d5155c58fe2fb76116ec01f1df64161d | |
parent | f7a1dd6e3ad59f0cfd51da29dfdbfd54122c5916 [diff] |
net: mac802154: comparision issue of type cast, finding by EXTRA_CFLAGS=-W Change MAC802154_CHAN_NONE from ~(u8)0 to 0xff, or the comparison in mac802154_wpan_xmit() for ``chan == MAC802154_CHAN_NONE'' will not succeed. This bug can be boiled down to ``u8 foo = 0xff; if (foo == ~(u8)0) [...] else [...]'' where the condition will always take the else branch. Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: David S. Miller <davem@davemloft.net>