staging: rtl8192u: ieee80211: ieee80211_rx.c: Replace bit shifting with BIT macro

Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Payal Kshirsagar 2019-04-02 18:58:32 +05:30 committed by Greg Kroah-Hartman
parent 005fb2de9a
commit 9361076277

View File

@ -2397,22 +2397,22 @@ static inline void ieee80211_process_probe_response(
"'%s' (%pM): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n",
escape_essid(info_element->data, info_element->len),
beacon->header.addr3,
(capability & (1 << 0xf)) ? '1' : '0',
(capability & (1 << 0xe)) ? '1' : '0',
(capability & (1 << 0xd)) ? '1' : '0',
(capability & (1 << 0xc)) ? '1' : '0',
(capability & (1 << 0xb)) ? '1' : '0',
(capability & (1 << 0xa)) ? '1' : '0',
(capability & (1 << 0x9)) ? '1' : '0',
(capability & (1 << 0x8)) ? '1' : '0',
(capability & (1 << 0x7)) ? '1' : '0',
(capability & (1 << 0x6)) ? '1' : '0',
(capability & (1 << 0x5)) ? '1' : '0',
(capability & (1 << 0x4)) ? '1' : '0',
(capability & (1 << 0x3)) ? '1' : '0',
(capability & (1 << 0x2)) ? '1' : '0',
(capability & (1 << 0x1)) ? '1' : '0',
(capability & (1 << 0x0)) ? '1' : '0');
(capability & BIT(0xf)) ? '1' : '0',
(capability & BIT(0xe)) ? '1' : '0',
(capability & BIT(0xd)) ? '1' : '0',
(capability & BIT(0xc)) ? '1' : '0',
(capability & BIT(0xb)) ? '1' : '0',
(capability & BIT(0xa)) ? '1' : '0',
(capability & BIT(0x9)) ? '1' : '0',
(capability & BIT(0x8)) ? '1' : '0',
(capability & BIT(0x7)) ? '1' : '0',
(capability & BIT(0x6)) ? '1' : '0',
(capability & BIT(0x5)) ? '1' : '0',
(capability & BIT(0x4)) ? '1' : '0',
(capability & BIT(0x3)) ? '1' : '0',
(capability & BIT(0x2)) ? '1' : '0',
(capability & BIT(0x1)) ? '1' : '0',
(capability & BIT(0x0)) ? '1' : '0');
if (ieee80211_network_init(ieee, beacon, network, stats)) {
IEEE80211_DEBUG_SCAN("Dropped '%s' (%pM) via %s.\n",