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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140113214429.GH7444@mwanda>
Date:	Tue, 14 Jan 2014 00:44:29 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Mark Einon <mark@...on.net>
Cc:	Pol Eyschen <poleyschen@...il.com>, devel@...verdev.osuosl.org,
	jack@...e.cz, Pol Eyschen <poleyschen@...mail.com>,
	sachin.kamat@...aro.org, gregkh@...uxfoundation.org,
	linux-kernel@...r.kernel.org, ufimtseva@...il.com
Subject: Re: [PATCH] Staging: ced1401: fix coding style in ced_ioc.c

On Mon, Jan 13, 2014 at 09:35:53PM +0000, Mark Einon wrote:
> On Mon, Jan 13, 2014 at 08:41:40PM +0100, Pol Eyschen wrote:
> > From: Pol Eyschen <poleyschen@...mail.com>
> > 
> > All comments fixed to match the kernel coding style.
> > 
> > Signed-off-by: Pol Eyschen <poleyschen@...il.com>
> > ---
> 
> This patch doesn't apply to my staging-next branch. Are you making your
> changes to the staging-next branch of
> git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git?
> 
> >  drivers/staging/ced1401/ced_ioc.c |  382 ++++++++++++++++++++++++-------------
> >  1 file changed, 249 insertions(+), 133 deletions(-)
> > 
> > diff --git a/drivers/staging/ced1401/ced_ioc.c b/drivers/staging/ced1401/ced_ioc.c
> > index 62efd74..e5172cb 100644
> > --- a/drivers/staging/ced1401/ced_ioc.c
> > +++ b/drivers/staging/ced1401/ced_ioc.c
> > @@ -41,7 +41,8 @@ static void FlushOutBuff(DEVICE_EXTENSION *pdx)
> >  {
> >  	dev_dbg(&pdx->interface->dev, "%s currentState=%d", __func__,
> >  		pdx->sCurrentState);
> > -	if (pdx->sCurrentState == U14ERR_TIME)	/* Do nothing if hardware in trouble */
> > +	if (pdx->sCurrentState == U14ERR_TIME)
> > +		/* Do nothing if hardware in trouble */
> >  		return;
> 
> Putting a comment after a single line 'if' and before the statement is
> not the norm and can be confusing. Please don't do it.
> 

The guideline is that multi-line indents should get {} braces for
readability even though they aren't needed for syntax.

	if (pdx->sCurrentState == U14ERR_TIME) {
		/* Do nothing if hardware in trouble */
		return;
	}

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ