Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753675AbaDDPSL (ORCPT ); Fri, 4 Apr 2014 11:18:11 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:65158 "EHLO mail-we0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752818AbaDDPSI (ORCPT ); Fri, 4 Apr 2014 11:18:08 -0400 Date: Fri, 4 Apr 2014 18:17:56 +0300 From: Kumar Amit Mehta To: Dan Carpenter 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 Message-ID: <20140404151756.GA14330@gmail.com> References: <1396605929-10514-1-git-send-email-gmate.amit@gmail.com> <20140404110707.GT6991@mwanda> <20140404114852.GA12452@gmail.com> <20140404132651.GV6991@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140404132651.GV6991@mwanda> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/