All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: rtl8188eu: core: rtw_mlme.c: Fix unbalanced braces around else.
@ 2019-03-18 12:59 Sanjana Sanikommu
  2019-03-18 13:55 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Sanjana Sanikommu @ 2019-03-18 12:59 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

Fix unbalanced braces after else statement.
Issue found by checkpatch.pl semantic patch results for rtw_mlme.c

CHECK: Unbalanced braces around else statement.

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index ca0cf8a86671..cbee02a86d22 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -1111,9 +1111,9 @@ static u8 search_max_mac_id(struct adapter *padapter)
 				break;
 		}
 		mac_id = aid + 1;
-	} else
+	} else {
 #endif
-	{/* adhoc  id =  31~2 */
+/* adhoc  id =  31~2 */
 		for (mac_id = NUM_STA-1; mac_id >= IBSS_START_MAC_ID; mac_id--) {
 			if (pmlmeinfo->FW_sta_info[mac_id].status == 1)
 				break;
-- 
2.17.1



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

* Re: [PATCH] Staging: rtl8188eu: core: rtw_mlme.c: Fix unbalanced braces around else.
  2019-03-18 12:59 [PATCH] Staging: rtl8188eu: core: rtw_mlme.c: Fix unbalanced braces around else Sanjana Sanikommu
@ 2019-03-18 13:55 ` Greg KH
  2019-03-18 14:18   ` sanjana99reddy99
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2019-03-18 13:55 UTC (permalink / raw)
  To: Sanjana Sanikommu; +Cc: outreachy-kernel

On Mon, Mar 18, 2019 at 06:29:18PM +0530, Sanjana Sanikommu wrote:
> Fix unbalanced braces after else statement.
> Issue found by checkpatch.pl semantic patch results for rtw_mlme.c
> 
> CHECK: Unbalanced braces around else statement.
> 
> Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
> ---
>  drivers/staging/rtl8188eu/core/rtw_mlme.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
> index ca0cf8a86671..cbee02a86d22 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
> @@ -1111,9 +1111,9 @@ static u8 search_max_mac_id(struct adapter *padapter)
>  				break;
>  		}
>  		mac_id = aid + 1;
> -	} else
> +	} else {
>  #endif
> -	{/* adhoc  id =  31~2 */
> +/* adhoc  id =  31~2 */

Never put anything in the first column within a function, unless it is a
jump label.  This isn't ok, but most importantly, I think you broke the
build.  The { is in that location for a reason, due to the #endif above
it, and can not be changed.

Please always think about the checkpatch changes you are making and do
not just blindly do them.

thanks,

greg k-h


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

* Re: [PATCH] Staging: rtl8188eu: core: rtw_mlme.c: Fix unbalanced braces around else.
  2019-03-18 13:55 ` Greg KH
@ 2019-03-18 14:18   ` sanjana99reddy99
  0 siblings, 0 replies; 3+ messages in thread
From: sanjana99reddy99 @ 2019-03-18 14:18 UTC (permalink / raw)
  To: outreachy-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1555 bytes --]



On Monday, March 18, 2019 at 7:25:25 PM UTC+5:30, gregkh wrote:
>
> On Mon, Mar 18, 2019 at 06:29:18PM +0530, Sanjana Sanikommu wrote: 
> > Fix unbalanced braces after else statement. 
> > Issue found by checkpatch.pl semantic patch results for rtw_mlme.c 
> > 
> > CHECK: Unbalanced braces around else statement. 
> > 
> > Signed-off-by: Sanjana Sanikommu <sanjana9...@gmail.com <javascript:>> 
> > --- 
> >  drivers/staging/rtl8188eu/core/rtw_mlme.c | 4 ++-- 
> >  1 file changed, 2 insertions(+), 2 deletions(-) 
> > 
> > diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
> b/drivers/staging/rtl8188eu/core/rtw_mlme.c 
> > index ca0cf8a86671..cbee02a86d22 100644 
> > --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
> > +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c 
> > @@ -1111,9 +1111,9 @@ static u8 search_max_mac_id(struct adapter 
> *padapter) 
> >                                  break; 
> >                  } 
> >                  mac_id = aid + 1; 
> > -        } else 
> > +        } else { 
> >  #endif 
> > -        {/* adhoc  id =  31~2 */ 
> > +/* adhoc  id =  31~2 */ 
>
> Never put anything in the first column within a function, unless it is a 
> jump label.  This isn't ok, but most importantly, I think you broke the 
> build.  The { is in that location for a reason, due to the #endif above 
> it, and can not be changed. 
>
> Please always think about the checkpatch changes you are making and do 
> not just blindly do them. 
>

Thanks for letting me know. I would drop them :)

Sanjana

>
> thanks, 
>
> greg k-h 
>

[-- Attachment #1.2: Type: text/html, Size: 2768 bytes --]

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

end of thread, other threads:[~2019-03-18 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-18 12:59 [PATCH] Staging: rtl8188eu: core: rtw_mlme.c: Fix unbalanced braces around else Sanjana Sanikommu
2019-03-18 13:55 ` Greg KH
2019-03-18 14:18   ` sanjana99reddy99

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.