staging: rtlwifi: base.c: Replace bit shifting with BIT macro
authorPayal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Tue, 2 Apr 2019 14:17:29 +0000 (19:47 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Apr 2019 17:57:11 +0000 (19:57 +0200)
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro
and remove cast.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtlwifi/base.c

index 35df2cf..b8358eb 100644 (file)
@@ -2446,7 +2446,7 @@ struct sk_buff *rtl_make_del_ba(struct ieee80211_hw *hw,
                                                  IEEE80211_STYPE_ACTION);
        action_frame->u.action.category = WLAN_CATEGORY_BACK;
        action_frame->u.action.u.delba.action_code = WLAN_ACTION_DELBA;
-       params = (u16)(1 << 11);        /* bit 11 initiator */
+       params = BIT(11);               /* bit 11 initiator */
        params |= (u16)(tid << 12);     /* bit 15:12 TID number */
 
        action_frame->u.action.u.delba.params = cpu_to_le16(params);