Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934197AbdC3RXh (ORCPT ); Thu, 30 Mar 2017 13:23:37 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:48672 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933373AbdC3RXY (ORCPT ); Thu, 30 Mar 2017 13:23:24 -0400 Date: Thu, 30 Mar 2017 19:23:12 +0200 From: Alexandre Belloni To: jacopo 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: <20170330172312.ooxwqmkz6sw7smgd@piout.net> References: <20170330124603.GA29301@arushi-HP-Pavilion-Notebook> <20170330133046.GA7900@w540> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170330133046.GA7900@w540> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 961 Lines: 38 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. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com