mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Janani Sankara Babu <jananis37@gmail.com>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	insafonov@gmail.com, mihaela.muraru21@gmail.com,
	goudapatilk@gmail.com, linux-kernel@vger.kernel.org,
	palaviv@gmail.com
Subject: Re: [PATCH] staging:rtl8188eu Remove unnecessary {} braces in
Date: Thu, 21 Sep 2017 03:24:00 -0700	[thread overview]
Message-ID: <1505989440.12311.22.camel@perches.com> (raw)
In-Reply-To: <20170921071536.visdfmkuvg2pv7sz@mwanda>

On Thu, 2017-09-21 at 10:15 +0300, Dan Carpenter wrote:
> On Thu, Sep 21, 2017 at 12:18:04PM +0530, Janani Sankara Babu wrote:
> > --- a/drivers/staging/rtl8188eu/hal/phy.c
> > +++ b/drivers/staging/rtl8188eu/hal/phy.c
> > @@ -728,9 +728,9 @@ static void patha_fill_iqk(struct adapter *adapt, bool iqkok, s32 result[][8],
> >  	u32 oldval_0, x, tx0_a, reg;
> >  	s32 y, tx0_c;
> >  
> > -	if (final_candidate == 0xFF) {
> > +	if (final_candidate == 0xFF)
> >  		return;
> > -	} else if (iqkok) {
> > +	else if (iqkok) {
> 
> No.  These ones stay.  Your change would introduce a new checkpatch.pl
> warning if you ran it against the patched file.  The rule here is that
> if one side of the if else has curly braces then both sides get them.

And the else could be removed

	if (final_candidate == 0xff)
		return;

	if (iqkok) {
		[etc...]

and the code should probably be

	if (final_candidate == 0xff)
		return;

	if (!iqkok)
		return;

	[unindented etc...]

or combine the first 2 tests

	if (final_candidate == 0xff || !iqkok)
		return;

	[unindented etc...]

      reply	other threads:[~2017-09-21 10:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21  6:48 Janani Sankara Babu
2017-09-21  7:15 ` Dan Carpenter
2017-09-21 10:24   ` Joe Perches [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=1505989440.12311.22.camel@perches.com \
    --to=joe@perches.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=goudapatilk@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=insafonov@gmail.com \
    --cc=jananis37@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mihaela.muraru21@gmail.com \
    --cc=palaviv@gmail.com \
    /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

Powered by JetHome