X-GM-THRID: 6669714716866117632 Date: Mon, 18 Mar 2019 07:18:22 -0700 (PDT) From: sanjana99reddy99@gmail.com To: outreachy-kernel Message-Id: In-Reply-To: <20190318135521.GA7342@kroah.com> References: <20190318125918.13149-1-sanjana99reddy99@gmail.com> <20190318135521.GA7342@kroah.com> Subject: Re: [PATCH] Staging: rtl8188eu: core: rtw_mlme.c: Fix unbalanced braces around else. MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1591_1997322923.1552918702595" X-Google-Token: EK7RvuQF8CSOfxmFYgk0 X-Google-IP: 203.109.108.32 ------=_Part_1591_1997322923.1552918702595 Content-Type: multipart/alternative; boundary="----=_Part_1592_1837841024.1552918702595" ------=_Part_1592_1837841024.1552918702595 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 > > > --- > > 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 > ------=_Part_1592_1837841024.1552918702595 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable


On Monday, March 18, 2019 at 7:25:25 PM UTC+5:30, = gregkh wrote:
On Mon, Mar 18, 2= 019 at 06:29:18PM +0530, Sanjana Sanikommu wrote:
> Fix unbalanced braces after else statement.
> Issue found by checkp= atch.pl semantic patch results for rtw_mlme.c
>=20
> CHECK: Unbalanced braces around else statement.
>=20
> Signed-off-by: Sanjana Sanikommu <sanjana9...@gmail.com>
> ---
> =C2=A0drivers/staging/rtl8188eu/core/rtw_mlme.c | 4 ++--
> =C2=A01 file changed, 2 insertions(+), 2 deletions(-)
>=20
> diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/driv= ers/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)
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0break;
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0mac_id =3D aid + 1;
> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} else
> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} else {
> =C2=A0#endif
> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{/* adhoc =C2=A0i= d =3D =C2=A031~2 */
> +/* adhoc =C2=A0id =3D =C2=A031~2 */

Never put anything in the first column within a function, unless it is = a
jump label. =C2=A0This isn't ok, but most importantly, I think you = broke the
build. =C2=A0The { 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 dr= op them :)

Sanjana

thanks,

greg k-h
------=_Part_1592_1837841024.1552918702595-- ------=_Part_1591_1997322923.1552918702595--