Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934424AbdC3SGZ (ORCPT ); Thu, 30 Mar 2017 14:06:25 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:37083 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933794AbdC3SGY (ORCPT ); Thu, 30 Mar 2017 14:06:24 -0400 Date: Thu, 30 Mar 2017 20:06:18 +0200 From: jacopo To: Alexandre Belloni Cc: Arushi Singhal , outreachy-kernel@googlegroups.com, Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: adc: replace comma with a semicolon Message-ID: <20170330180618.GD7900@w540> References: <20170330124603.GA29301@arushi-HP-Pavilion-Notebook> <20170330133046.GA7900@w540> <20170330172312.ooxwqmkz6sw7smgd@piout.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170330172312.ooxwqmkz6sw7smgd@piout.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1371 Lines: 51 Hi Alexandre hope you're doing good! On Thu, Mar 30, 2017 at 07:23:12PM +0200, Alexandre Belloni wrote: > On 30/03/2017 at 15:30:46 +0200, jacopo wrote: > > Hi Arushi, > > thanks for your patch > > > > On Thu, Mar 30, 2017 at 06:16:03PM +0530, Arushi Singhal wrote: > > > Replace a comma between expression statements by a semicolon. This > > > changes the semantics of the code, but given the current indentation > > > appears to be what is intended. > > > A simplified version of the Coccinelle semantic patch that performs this > > > transformation is as follows: > > > > > > // > > > @r@ > > > expression e1,e2; > > > @@ > > > > > > e1 > > > -, > > > +; > > > e2; > > > // > > > > > > > You can simply say that this fixes what appears to be a bug to me. > > I wonder how this does even compile.. > > > > It is not a bug, it is perfectly valid and working as expected/intended. > This is just a cosmetic change. > > See https://en.wikipedia.org/wiki/Comma_operator if you want to > understand. > Thanks! That's valid and legal (I should have thought at multiple expression in for(;;) as an example). Ignore my comment then (I still don't think it was "intended" as it's quite unusual to see commas there :) Thanks j > > -- > Alexandre Belloni, Free Electrons > Embedded Linux and Kernel engineering > http://free-electrons.com