• J
    mac80211: fix variable truncation on 32-bit · 1d4df3a5
    Johannes Berg 提交于
    Stephen Rothwell reported these warnings from a 32-bit build:
    
      net/mac80211/mlme.c:1771: warning: left shift count >= width of type
      net/mac80211/mlme.c:1772: warning: left shift count >= width of type
      net/mac80211/mlme.c:1773: warning: left shift count >= width of type
      net/mac80211/mlme.c:1774: warning: left shift count >= width of type
      net/mac80211/mlme.c:1775: warning: left shift count >= width of type
    
    This shows a bug in my code -- BIT(X) uses just "1 << X" which means
    a 32-bit integer on 32-bit platforms, but the code here needs a u64
    on all platforms. Fix this by using "1ULL << X" instead of BIT(X).
    
    Thanks Stephen!
    Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
    Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
    1d4df3a5
mlme.c 65.3 KB