linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Marcelo Aloisio da Silva <marcelo.as@aol.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: r8188eu: remove unnecessary braces in if statements
Date: Sun, 20 Feb 2022 14:31:05 -0300	[thread overview]
Message-ID: <20220220173105.GA11223@snoopy> (raw)
In-Reply-To: <20220218125058.GE2467@kadam>

On Fri, Feb 18, 2022 at 03:50:58PM +0300, Dan Carpenter wrote:
> On Fri, Feb 18, 2022 at 02:44:55PM +0300, Dan Carpenter wrote:
> > On Fri, Feb 18, 2022 at 01:37:05AM -0300, Marcelo Aloisio da Silva wrote:
> > > Braces are not necessary for single statement blocks.
> > > 
> > > Signed-off-by: Marcelo Aloisio da Silva <marcelo.as@aol.com>
> > > ---
> > >  drivers/staging/r8188eu/core/rtw_mlme.c | 8 ++------
> > >  1 file changed, 2 insertions(+), 6 deletions(-)
> > > 
> > > diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
> > > index 45eff3018d73..ad1d73a27548 100644
> > > --- a/drivers/staging/r8188eu/core/rtw_mlme.c
> > > +++ b/drivers/staging/r8188eu/core/rtw_mlme.c
> > > @@ -1379,10 +1379,8 @@ void rtw_dynamic_check_timer_handlder(struct adapter *adapter)
> > >  	if (pregistrypriv->wifi_spec == 1) {
> > >  		struct wifidirect_info *pwdinfo = &adapter->wdinfo;
> > >  		if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
> > > -		{
> > >  			/* auto site survey */
> > >  			rtw_auto_scan_handler(adapter);
> > > -		}
> > 
> > Generally we prefer if statements around multi-line indents.  It helps
> 
> I meant "prefer curly braces around multi-line indents".
> 
> regards,
> dan carpenter
> 
Thanks Dan for the feedback.
I'll fix the brace for this if statement in another patch.

Regards,
Marcelo

      reply	other threads:[~2022-02-20 17:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220218043705.GA23783.ref@snoopy>
2022-02-18  4:37 ` [PATCH] staging: r8188eu: remove unnecessary braces in if statements Marcelo Aloisio da Silva
2022-02-18 11:44   ` Dan Carpenter
2022-02-18 12:50     ` Dan Carpenter
2022-02-20 17:31       ` Marcelo Aloisio da Silva [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220220173105.GA11223@snoopy \
    --to=marcelo.as@aol.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=phil@philpotter.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).