All of lore.kernel.org
 help / color / mirror / Atom feed
* [Outreachy kernel] [PATCH 0/2] staging: Replace bit shifting with BIT macro
@ 2019-04-02 12:40 Payal Kshirsagar
  2019-04-02 12:40 ` [Outreachy kernel] [PATCH 1/2] staging: rtl8723bs: core: " Payal Kshirsagar
  2019-04-02 12:40 ` [Outreachy kernel] [PATCH 2/2] staging: rtlwifi: base.c: " Payal Kshirsagar
  0 siblings, 2 replies; 5+ messages in thread
From: Payal Kshirsagar @ 2019-04-02 12:40 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.

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] 5+ messages in thread

* [Outreachy kernel] [PATCH 1/2] staging: rtl8723bs: core: Replace bit shifting with BIT macro
  2019-04-02 12:40 [Outreachy kernel] [PATCH 0/2] staging: Replace bit shifting with BIT macro Payal Kshirsagar
@ 2019-04-02 12:40 ` Payal Kshirsagar
  2019-04-02 12:40 ` [Outreachy kernel] [PATCH 2/2] staging: rtlwifi: base.c: " Payal Kshirsagar
  1 sibling, 0 replies; 5+ messages in thread
From: Payal Kshirsagar @ 2019-04-02 12:40 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] 5+ messages in thread

* [Outreachy kernel] [PATCH 2/2] staging: rtlwifi: base.c: Replace bit shifting with BIT macro
  2019-04-02 12:40 [Outreachy kernel] [PATCH 0/2] staging: Replace bit shifting with BIT macro Payal Kshirsagar
  2019-04-02 12:40 ` [Outreachy kernel] [PATCH 1/2] staging: rtl8723bs: core: " Payal Kshirsagar
@ 2019-04-02 12:40 ` Payal Kshirsagar
  2019-04-02 13:09   ` Greg KH
  1 sibling, 1 reply; 5+ messages in thread
From: Payal Kshirsagar @ 2019-04-02 12:40 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/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..e9830b1 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 = (u16)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] 5+ messages in thread

* Re: [Outreachy kernel] [PATCH 2/2] staging: rtlwifi: base.c: Replace bit shifting with BIT macro
  2019-04-02 12:40 ` [Outreachy kernel] [PATCH 2/2] staging: rtlwifi: base.c: " Payal Kshirsagar
@ 2019-04-02 13:09   ` Greg KH
  2019-04-02 13:26     ` Payal Kshirsagar
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2019-04-02 13:09 UTC (permalink / raw)
  To: Payal Kshirsagar; +Cc: outreachy-kernel

On Tue, Apr 02, 2019 at 06:10:23PM +0530, Payal Kshirsagar wrote:
> 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/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..e9830b1 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 = (u16)BIT(11);	/* bit 11 initiator */

Why are you still casting here?

thanks,

greg k-h


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

* Re: [Outreachy kernel] [PATCH 2/2] staging: rtlwifi: base.c: Replace bit shifting with BIT macro
  2019-04-02 13:09   ` Greg KH
@ 2019-04-02 13:26     ` Payal Kshirsagar
  0 siblings, 0 replies; 5+ messages in thread
From: Payal Kshirsagar @ 2019-04-02 13:26 UTC (permalink / raw)
  To: Greg KH; +Cc: outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]

On Tue, 2 Apr 2019 at 18:39, Greg KH <greg@kroah.com> wrote:

> On Tue, Apr 02, 2019 at 06:10:23PM +0530, Payal Kshirsagar wrote:
> > 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/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..e9830b1 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 = (u16)BIT(11);  /* bit 11 initiator */
>
> Why are you still casting here?
>

Yes, there is a no need to cast.
I will correct it and send v2 for this patchset.
thanks,
payal


> thanks,
>
> greg k-h
>

[-- Attachment #2: Type: text/html, Size: 1960 bytes --]

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-02 12:40 [Outreachy kernel] [PATCH 0/2] staging: Replace bit shifting with BIT macro Payal Kshirsagar
2019-04-02 12:40 ` [Outreachy kernel] [PATCH 1/2] staging: rtl8723bs: core: " Payal Kshirsagar
2019-04-02 12:40 ` [Outreachy kernel] [PATCH 2/2] staging: rtlwifi: base.c: " Payal Kshirsagar
2019-04-02 13:09   ` Greg KH
2019-04-02 13:26     ` 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.