public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Kumar Amit Mehta <gmate.amit@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: abbotti@mev.co.uk, hsweeten@visionengravers.com, wharms@bfs.de,
	gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: comedi: drivers: pcl812.c: fixed a coding style issue
Date: Fri, 04 Apr 2014 15:17:56 +0000	[thread overview]
Message-ID: <20140404151756.GA14330@gmail.com> (raw)
In-Reply-To: <20140404132651.GV6991@mwanda>

On Fri, Apr 04, 2014 at 04:26:51PM +0300, Dan Carpenter wrote:
> On Fri, Apr 04, 2014 at 02:48:52PM +0300, Kumar Amit Mehta wrote:
> > On Fri, Apr 04, 2014 at 02:07:07PM +0300, Dan Carpenter wrote:
> > > On Fri, Apr 04, 2014 at 01:05:29PM +0300, Kumar Amit Mehta wrote:
> > > > Fixed a coding style issue. Reported by checkpatch.pl
> > > > 
> > > 
> > > It's better if the commit messages are more specific than this.
> > 
> > So, should I resend the patch with a more appropriate commit message ?
> 
> [PATCH] staging: comedi: drivers: pcl812.c: add curly braces for checkpatch
> 
> Kernel style is that if one side of the if else statement gets has curly
> braces then both side should have them.

Dan, 

What Walter mentioned also makes sense, So shouldn't it be something
like this:

[amit@localhost linux-next]$ git diff
diff --git a/drivers/staging/comedi/drivers/pcl812.c
b/drivers/staging/comedi/drivers/pcl812.c
index 160eac8..552b696 100644
--- a/drivers/staging/comedi/drivers/pcl812.c
+++ b/drivers/staging/comedi/drivers/pcl812.c
@@ -803,16 +803,14 @@ static int pcl812_ai_cmd(struct comedi_device
*dev, struct comedi_subdevice *s)
 
        pcl812_ai_set_chan_range(dev, cmd->chanlist[0], 1);
 
+       devpriv->ai_dma = 0;
        if (devpriv->dma) {     /*  check if we can use DMA transfer */
                devpriv->ai_dma = 1;
                for (i = 1; i < cmd->chanlist_len; i++)
                        if (cmd->chanlist[0] != cmd->chanlist[i]) {
                                /*  we cann't use DMA :-( */
-                               devpriv->ai_dma = 0;
                                break;
                        }
-       } else
-               devpriv->ai_dma = 0;
 
        devpriv->ai_act_scan = 0;
        devpriv->ai_poll_ptr = 0;


Thanks,
Kumar

  reply	other threads:[~2014-04-04 15:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-04 10:05 [PATCH] staging: comedi: drivers: pcl812.c: fixed a coding style issue Kumar Amit Mehta
2014-04-04 11:07 ` Dan Carpenter
2014-04-04 11:48   ` Kumar Amit Mehta
2014-04-04 13:26     ` Dan Carpenter
2014-04-04 15:17       ` Kumar Amit Mehta [this message]
2014-04-04 15:28         ` Joe Perches
2014-04-04 15:32         ` Dan Carpenter
2014-04-04 12:39 ` walter harms

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=20140404151756.GA14330@gmail.com \
    --to=gmate.amit@gmail.com \
    --cc=abbotti@mev.co.uk \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hsweeten@visionengravers.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wharms@bfs.de \
    /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