All of lore.kernel.org
 help / color / mirror / Atom feed
* [Outreachy kernel] [PATCH v3 0/2] staging: Replace bit shifting with BIT macro
@ 2019-04-02 14:17 Payal Kshirsagar
  2019-04-02 14:17 ` [Outreachy kernel] [PATCH v3 1/2] staging: rtl8723bs: core: " Payal Kshirsagar
  2019-04-02 14:17 ` [Outreachy kernel] [PATCH v3 2/2] staging: rtlwifi: base.c: " Payal Kshirsagar
  0 siblings, 2 replies; 3+ messages in thread
From: Payal Kshirsagar @ 2019-04-02 14:17 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Payal Kshirsagar

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

Changes in v2:
        -Remove type cast.

Changes in v3:
	-Align comments properly.

Payal Kshirsagar (2):
  staging: rtl8723bs: core: Replace bit shifting with BIT macro
  staging: rtlwifi: base.c: Replace bit shifting with BIT macro

 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +-
 drivers/staging/rtlwifi/base.c                | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Outreachy kernel] [PATCH v3 1/2] staging: rtl8723bs: core: Replace bit shifting with BIT macro
  2019-04-02 14:17 [Outreachy kernel] [PATCH v3 0/2] staging: Replace bit shifting with BIT macro Payal Kshirsagar
@ 2019-04-02 14:17 ` Payal Kshirsagar
  2019-04-02 14:17 ` [Outreachy kernel] [PATCH v3 2/2] staging: rtlwifi: base.c: " Payal Kshirsagar
  1 sibling, 0 replies; 3+ messages in thread
From: Payal Kshirsagar @ 2019-04-02 14:17 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Payal Kshirsagar

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>
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index ebb45ac..254dd33 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -3958,7 +3958,7 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
 				/*  A-MSDU NOT Supported */
 				BA_para_set = 0;
 				/*  immediate Block Ack */
-				BA_para_set |= (1 << 1) & IEEE80211_ADDBA_PARAM_POLICY_MASK;
+				BA_para_set |= BIT(1) & IEEE80211_ADDBA_PARAM_POLICY_MASK;
 				/*  TID */
 				BA_para_set |= (status << 2) & IEEE80211_ADDBA_PARAM_TID_MASK;
 				/*  max buffer size is 8 MSDU */
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Outreachy kernel] [PATCH v3 2/2] staging: rtlwifi: base.c: Replace bit shifting with BIT macro
  2019-04-02 14:17 [Outreachy kernel] [PATCH v3 0/2] staging: Replace bit shifting with BIT macro Payal Kshirsagar
  2019-04-02 14:17 ` [Outreachy kernel] [PATCH v3 1/2] staging: rtl8723bs: core: " Payal Kshirsagar
@ 2019-04-02 14:17 ` Payal Kshirsagar
  1 sibling, 0 replies; 3+ messages in thread
From: Payal Kshirsagar @ 2019-04-02 14:17 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Payal Kshirsagar

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>
---
 drivers/staging/rtlwifi/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c
index 35df2cf..b8358eb 100644
--- a/drivers/staging/rtlwifi/base.c
+++ b/drivers/staging/rtlwifi/base.c
@@ -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);
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-02 14:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-02 14:17 [Outreachy kernel] [PATCH v3 0/2] staging: Replace bit shifting with BIT macro Payal Kshirsagar
2019-04-02 14:17 ` [Outreachy kernel] [PATCH v3 1/2] staging: rtl8723bs: core: " Payal Kshirsagar
2019-04-02 14:17 ` [Outreachy kernel] [PATCH v3 2/2] staging: rtlwifi: base.c: " Payal Kshirsagar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.