lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1505989440.12311.22.camel@perches.com>
Date:   Thu, 21 Sep 2017 03:24:00 -0700
From:   Joe Perches <joe@...ches.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>,
        Janani Sankara Babu <jananis37@...il.com>
Cc:     gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
        insafonov@...il.com, mihaela.muraru21@...il.com,
        goudapatilk@...il.com, linux-kernel@...r.kernel.org,
        palaviv@...il.com
Subject: Re: [PATCH] staging:rtl8188eu Remove unnecessary {} braces in

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...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ