Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp802309pxa; Sat, 22 Aug 2020 00:09:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrg1h51sa1nvx1aSS1hnHBS8LF1yzHQ47kfRNTihvm68dOqrM2ysbjIaX5kLwd+HR/24pj X-Received: by 2002:a50:9e4c:: with SMTP id z70mr5999264ede.384.1598080180962; Sat, 22 Aug 2020 00:09:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598080180; cv=none; d=google.com; s=arc-20160816; b=wvueHHwfidVC7TiN5qajn7MibsU0F7POB5zyZASM/xfnegSLchwwqHMusf1VYgtt3b okfL/Y3LCp/p3hSPU27OaowLaf5zWPkqbYI7RCJroLadVbmHBMMx8auEkXj9DR1CGrDu Au5Fdr509UMWDbS2PWr6qS1j//5grV5lYtuxs4ZsaLS3mAdH7RtbaDny+lo+YfRfpapw ms9Vq2mPcGci7ZV1bq5NnWYuJwrcMiu1lZ/6vZPvKvQNlkiOqy0blmm02hig1E+LPKMc ApfJCVA+DE3+hxFe16Owmdq5S+QEBZx3ldf3g4UtHZTee//nmZrSZGC+n6JN6ToQ/tfi 8Qig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=y0s1fV+aIkIA01yVQIpqhyJOnLbSjk7mu2Vy5U5Ycr8=; b=FAyOFSTw3CwUcpo9H6Q4QyfxG/cTA6mPvNPTExS+VudkgFapgYL7m8lIAmnHbQTX29 nlEXL67/fVBhEhMhzQXAWw49JwpepDo6CT1sZV9djLG4BMhcGPb/bmOXArmGDqekvwMW svnsXyNyNtrWsYPC7XwPyriya9/5YjT6SibbNZ8ZSGB8c7rR+krbI8kh9WRchI6MbEWo 3ZYk3oJrF0RRUrzNzuLrR98yVkNHNTpK2W8KLrm0+CAlfUNIcZPb1ubg1+0Vp77n09OT Kf1mP46X/oRRPS5yOt2Kn1pzX1zoGCdM0dsmcagZ27dXKgyXj+SB0eEZj1ZuLX8JOuKw FAnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w23si2561648edu.32.2020.08.22.00.09.17; Sat, 22 Aug 2020 00:09:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727082AbgHVHHh (ORCPT + 99 others); Sat, 22 Aug 2020 03:07:37 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:29709 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726856AbgHVHHg (ORCPT ); Sat, 22 Aug 2020 03:07:36 -0400 X-IronPort-AV: E=Sophos;i="5.76,339,1592863200"; d="scan'208";a="464294685" Received: from abo-173-121-68.mrs.modulonet.fr (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Aug 2020 09:07:34 +0200 Date: Sat, 22 Aug 2020 09:07:34 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Joe Perches cc: =?UTF-8?Q?Valdis_Kl=C4=93tnieks?= , kernel-janitors , kernelnewbies , linux-kernel-mentees@lists.linuxfoundation.org, Andrew Morton , cocci , Giuseppe Scrivano , LKML , Andy Whitcroft Subject: Re: [Cocci] coccinelle: Convert comma to semicolons (was Re: [PATCH] checkpatch: Add test for comma use that should be semicolon) In-Reply-To: <3836b482434bd0b9a609959d3696cc6113a93f2f.camel@perches.com> Message-ID: References: <20200818184107.f8af232fb58b17160c570874@linux-foundation.org> <3bf27caf462007dfa75647b040ab3191374a59de.camel@perches.com> <744af177c09f8ce22c99d6e1df458bced558518b.camel@perches.com> <162653.1598067338@turing-police> <3836b482434bd0b9a609959d3696cc6113a93f2f.camel@perches.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-12852889-1598080054=:3150" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-12852889-1598080054=:3150 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Fri, 21 Aug 2020, Joe Perches wrote: > On Fri, 2020-08-21 at 23:35 -0400, Valdis Klētnieks wrote: > > On Fri, 21 Aug 2020 18:08:08 -0700, Joe Perches said: > > > (forwarding on to kernel-janitors/mentees and kernelnewbies) > > > > > > Just fyi for anyone that cares: > > > > > > A janitorial task for someone might be to use Julia's coccinelle > > > script below to convert the existing instances of commas that > > > separate statements into semicolons. > > > > Note that you need to *really* check for possible changes in semantics. > > It's *usually* OK to do that, but sometimes it's not... > > > > for (i=0; i++, last++; !last) { > > > > changing that comma to a ; will break the compile. In other cases, it can > > introduce subtle bugs. > > True enough for a general statement, though the coccinelle > script Julia provided does not change a single instance of > for loop expressions with commas. > > As far as I can tell, no logic defect is introduced by the > script at all. The script has a rule to ensure that what is changed is part of a top level statement that has the form e1, e2;. I put that in to avoid transforming cases where the comma is the body of a macro, but it protects against for loop headers as well. julia --8323329-12852889-1598080054=:3150--