From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43936C47425 for ; Tue, 29 Sep 2020 12:48:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0219C2083B for ; Tue, 29 Sep 2020 12:48:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732068AbgI2MsJ (ORCPT ); Tue, 29 Sep 2020 08:48:09 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:38307 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729646AbgI2Mrg (ORCPT ); Tue, 29 Sep 2020 08:47:36 -0400 X-IronPort-AV: E=Sophos;i="5.77,318,1596492000"; d="scan'208";a="470060117" 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; 29 Sep 2020 14:47:29 +0200 Date: Tue, 29 Sep 2020 14:47:29 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Dan Carpenter cc: Ard Biesheuvel , Julia Lawall , linux-iio@vger.kernel.org, drbd-dev@tron.linbit.com, =?UTF-8?Q?Valdis_Kl=C4=93tnieks?= , David Lechner , Neil Armstrong , Martin Blumenstingl , linux-wireless@vger.kernel.org, "Rafael J. Wysocki" , kernel-janitors@vger.kernel.org, Linux Kernel Mailing List , linux-stm32@st-md-mailman.stormreply.com, linux-block@vger.kernel.org, linux-ide@vger.kernel.org, Linux Crypto Mailing List , Joe Perches , linux-amlogic@lists.infradead.org, Thomas Gleixner , ACPI Devel Maling List , openipmi-developer@lists.sourceforge.net, linux-clk@vger.kernel.org, Linux ARM , Jerome Brunet Subject: Re: [PATCH 00/18] use semicolons rather than commas to separate statements In-Reply-To: <20200929124108.GY4282@kadam> Message-ID: References: <1601233948-11629-1-git-send-email-Julia.Lawall@inria.fr> <20200929124108.GY4282@kadam> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Tue, 29 Sep 2020, Dan Carpenter wrote: > On Tue, Sep 29, 2020 at 02:20:00PM +0200, Ard Biesheuvel wrote: > > On Sun, 27 Sep 2020 at 21:56, Julia Lawall wrote: > > > > > > These patches replace commas by semicolons. > > > > > > Why? > > > > In the best case, these commas are just uninitentional mess, like typing > an extra space character or something. I've looked at them before and > one case I see where they are introduced is when people convert a > struct initializer to code. > > - struct foo { > - .a = 1, > - .b = 2, > ... > + foo.a = 1, > + foo.b = 2, > > The times where commas are used deliberately to replace curly braces are > just evil. Either way the code is cleaner with semi-colons. I also found exaamples like the following to be particularly unforunate: fprintf(stderr, "page_nr %lu wrong count %Lu %Lu\n", page_nr, count, count_verify[page_nr]), exit(1); The exit is very hard to see, unless you know to look for it. julia