public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Mark Einon <mark@einon.net>
Cc: Pol Eyschen <poleyschen@gmail.com>,
	devel@driverdev.osuosl.org, jack@suse.cz,
	Pol Eyschen <poleyschen@hotmail.com>,
	sachin.kamat@linaro.org, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, ufimtseva@gmail.com
Subject: Re: [PATCH] Staging: ced1401: fix coding style in ced_ioc.c
Date: Tue, 14 Jan 2014 00:44:29 +0300	[thread overview]
Message-ID: <20140113214429.GH7444@mwanda> (raw)
In-Reply-To: <20140113213552.GA5368@einon.net>

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@hotmail.com>
> > 
> > All comments fixed to match the kernel coding style.
> > 
> > Signed-off-by: Pol Eyschen <poleyschen@gmail.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


  reply	other threads:[~2014-01-13 21:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13 19:41 [PATCH] Staging: ced1401: fix coding style in ced_ioc.c Pol Eyschen
2014-01-13 21:35 ` Mark Einon
2014-01-13 21:44   ` Dan Carpenter [this message]
2014-01-13 22:31     ` Pol Eyschen
2014-01-13 22:38       ` Dan Carpenter
2014-01-13 22:41       ` Greg KH
2014-01-13 23:56 ` Greg KH
2014-01-14  2:19   ` Joe Perches
2014-01-14  5:09     ` [PATCH] staging: ced1401: Fix dev_<level> messages Joe Perches

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=20140113214429.GH7444@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@einon.net \
    --cc=poleyschen@gmail.com \
    --cc=poleyschen@hotmail.com \
    --cc=sachin.kamat@linaro.org \
    --cc=ufimtseva@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