Staging: rtl8712: Remove duplicated argument to |
PATCH 1/1 Staging: rtl8712: Remove duplicated argument to |
Delete duplicated argument to | for the state argument in the _clr_fwstate_() function call as it is redundant. Detected with coccinelle.
--- drivers/staging/rtl8712/rtl871x_ioctl_set.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8712/rtl871x_ioctl_set.c +1 -2
@@ -266,8 +266,7 @@ void r8712_set_802_11_infrastructure_mode(struct _adapter *padapter,/* clear WIFI_STATION_STATE; WIFI_AP_STATE; WIFI_ADHOC_STATE; * WIFI_ADHOC_MASTER_STATE */ _clr_fwstate_ (pmlmepriv,WIFI_STATION_STATE |WIFI_AP_STATE | -WIFI_ADHOC_STATE |WIFI_ADHOC_MASTER_STATE | -WIFI_AP_STATE ); +WIFI_ADHOC_STATE |WIFI_ADHOC_MASTER_STATE );switch (networktype) {case Ndis802_11IBSS:set_fwstate (pmlmepriv,WIFI_ADHOC_STATE );
Signature · 1 line
1.9.1
Quoted 14 lines · Cristina Opriceana
Delete duplicated argument to | for the state argument in the
_clr_fwstate_()function call as it is redundant. Detected with coccinelle.Signed-off-by Cristina Opriceana <[email protected]>--- drivers/staging/rtl8712/rtl871x_ioctl_set.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/rtl8712/rtl871x_ioctl_set.c +0
-0
drivers/staging/rtl8712/rtl871x_ioctl_set.c void r8712_set_802_11_infrastructure_mode(struct _adapter *padapter, · line 269
Quoted 6 lines
drivers/staging/rtl8712/rtl871x_ioctl_set.c +1
-2@@ -266,8 +266,7 @@ void r8712_set_802_11_infrastructure_mode(struct _adapter *padapter,/* clear WIFI_STATION_STATE; WIFI_AP_STATE; WIFI_ADHOC_STATE; * WIFI_ADHOC_MASTER_STATE */ _clr_fwstate_ (pmlmepriv,WIFI_STATION_STATE |WIFI_AP_STATE | -WIFI_ADHOC_STATE |WIFI_ADHOC_MASTER_STATE | -WIFI_AP_STATE ); +WIFI_ADHOC_STATE |WIFI_ADHOC_MASTER_STATE );
For these, you should normally check the nearby code to see if they actually meant something else, but thanks to the comment that seems unlikely in this case. How did you find it?
julia
Quoted 13 lines
drivers/staging/rtl8712/rtl871x_ioctl_set.c +0
-0switch (networktype) {case Ndis802_11IBSS:set_fwstate (pmlmepriv,WIFI_ADHOC_STATE );Signature · 8 lines
1.9.1 -- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20150328013012.GA7624%40Inspiron. For more options, visit https://groups.google.com/d/optout.
Quoted 29 lines · Julia Lawall
Review
Quoted 11 lines · Cristina Opriceana
Delete duplicated argument to | for the state argument in the
_clr_fwstate_()function call as it is redundant. Detected with coccinelle.Signed-off-by Cristina Opriceana <[email protected] <javascript:>>---
drivers/staging/rtl8712/rtl871x_ioctl_set.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/staging/rtl8712/rtl871x_ioctl_set.cdrivers/staging/rtl8712/rtl871x_ioctl_set.c void r8712_set_802_11_infrastructure_mode(struct
Quoted 4 lines
index bd1d1b7..22262b3 100644
drivers/staging/rtl8712/rtl871x_ioctl_set.c +0
-0@@ -266,8 +266,7 @@ void r8712_set_802_11_infrastructure_mode(struct
_adapter*padapter,drivers/staging/rtl8712/rtl871x_ioctl_set.c void r8712_set_802_11_infrastructure_mode(struct · line 266
Quoted 1 line
drivers/staging/rtl8712/rtl871x_ioctl_set.c +0
-0/* clear WIFI_STATION_STATE; WIFI_AP_STATE;
WIFI_ADHOC_STATE;drivers/staging/rtl8712/rtl871x_ioctl_set.c void r8712_set_802_11_infrastructure_mode(struct · line 268
Quoted 2 lines
drivers/staging/rtl8712/rtl871x_ioctl_set.c +0
-0* WIFI_ADHOC_MASTER_STATE */ _clr_fwstate_(pmlmepriv, WIFI_STATION_STATE |
WIFI_AP_STATE|drivers/staging/rtl8712/rtl871x_ioctl_set.c void r8712_set_802_11_infrastructure_mode(struct · line 269
Quoted 1 line
drivers/staging/rtl8712/rtl871x_ioctl_set.c +0
-1- WIFI_ADHOC_STATE |
WIFI_ADHOC_MASTER_STATE|drivers/staging/rtl8712/rtl871x_ioctl_set.c void r8712_set_802_11_infrastructure_mode(struct · line 269
Quoted 2 lines
drivers/staging/rtl8712/rtl871x_ioctl_set.c +1
-1- WIFI_AP_STATE); + WIFI_ADHOC_STATE |
Quoted 8 lines
WIFI_ADHOC_MASTER_STATE);For these, you should normally check the nearby code to see if they actually meant something else, but thanks to the comment that seems unlikely in this case. How did you find it?
julia
Well, it was detected with coccinelle, then I followed the code and saw it was duplicated.
Quoted 20 lines
Quoted 9 lines
drivers/staging/rtl8712/rtl871x_ioctl_set.c +0
-0switch (networktype) {case Ndis802_11IBSS:set_fwstate (pmlmepriv,WIFI_ADHOC_STATE );Signature · 4 lines
1.9.1 -- You received this message because you are subscribed to the GoogleGroups "outreachy-kernel" group.
Quoted 1 line
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected] <javascript:>.
Quoted 1 line
To post to this group, send email to [email protected]
<javascript:>.
Quoted 1 line
To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/20150328013012.GA7624%40Inspiron.
Quoted 2 lines
For more options, visit https://groups.google.com/d/optout.
Quoted 40 lines · Cristina Georgiana Opriceana
On Saturday, March 28, 2015 at 8:07:40 AM UTC+2, Julia Lawall wrote:
On Sat, 28 Mar 2015, Cristina Opriceana wrote: > Delete duplicated argument to | for the state argument in > the _clr_fwstate_() function call as it is redundant. > Detected with coccinelle. > > Signed-off-by: Cristina Opriceana <[email protected]> > --- > drivers/staging/rtl8712/rtl871x_ioctl_set.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_set.c b/drivers/staging/rtl8712/rtl871x_ioctl_set.c > index bd1d1b7..22262b3 100644 > --- a/drivers/staging/rtl8712/rtl871x_ioctl_set.c > +++ b/drivers/staging/rtl8712/rtl871x_ioctl_set.c > @@ -266,8 +266,7 @@ void r8712_set_802_11_infrastructure_mode(struct _adapter *padapter, > /* clear WIFI_STATION_STATE; WIFI_AP_STATE; WIFI_ADHOC_STATE; > * WIFI_ADHOC_MASTER_STATE */ > _clr_fwstate_(pmlmepriv, WIFI_STATION_STATE | WIFI_AP_STATE | > - WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE | > - WIFI_AP_STATE); > + WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE); For these, you should normally check the nearby code to see if they actually meant something else, but thanks to the comment that seems unlikely in this case. How did you find it? julia
Quoted 2 lines
Well, it was detected with coccinelle, then I followed the code and saw it was duplicated.
Oops, I missed that you already said that in the commit message :)
julia
Quoted 33 lines
> switch (networktype) { > case Ndis802_11IBSS: > set_fwstate(pmlmepriv, WIFI_ADHOC_STATE); > -- > 1.9.1 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/20150328013012.GA7624%40 Inspiron. > For more options, visit https://groups.google.com/d/optout. >--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/15b6d646-9754-4212-a199- 83d1b23ddd30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.