Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3476719pxu; Sun, 11 Oct 2020 11:04:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyW45tmAIgH6UVG/4JWN2KfkW7VuwggvOIcncj5TxbL6+v0soM3xZfolconytO0YOoN5qDy X-Received: by 2002:a17:906:c0d1:: with SMTP id bn17mr13139868ejb.114.1602439465441; Sun, 11 Oct 2020 11:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602439465; cv=none; d=google.com; s=arc-20160816; b=wWoMRmejVUOzxR9LrBerCAP3l2TladDiIpXaGqH3Fbf4OPHjCyDAOEQlSM9T/+MXR2 c4bn8dW2iUSXLBVbc1eAhu+SlpXFaek7fVArpdzqXdYwe0eDLihDQ5DSAowBh3HzS9M3 MIaqzzt9vpa/Ad+iSqkJ7iuB48flceWH841X10paxt6RL8PFMag+76Smxg4B6T9NNHQQ hAeyvw79RUbBV1zdRL106ofMtc7DxekKXiE7g3G+EDikkCDngGj5YPLU4FsLSJ1ipB8X Y9fDi5Np5DGml8lKN/xAECzZOtuoNpbyAnhakJQxX6prcVMfCqENfuS1iWBrXzKfq2Xt WWNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=dB9K4rcMZxom8icZpXVEw/G/87jDGo5pElBc8KnDLJA=; b=oT0OURBQZD6IYksk6zJLiE0sY/Zio+MyksgpzXha6T5jbL+LyGGuEyDO2iovi2o4JT BSLtYNiRgcUalusg+8APomg25hxpZlSyfnU8OEp0zxXGn0dceXC29gVpiM4u7Y0zOlI9 A2byHgb2k4L7qkcZTInLQWn0dlw7EYgIg0twEvRyAYyoetA2dSE/H56OpWU9NAKo4dNX Rd2/69lUdtSBZ9LzQM4JMbJpKbBep57Hf8UhXo1PCL/HblKPNnhjfLcZezQ7net7b35A BqPFJex6DHnb67tDqTCahrLb9p0GsI3hEjxyyNo0JZaoM5aMelY4breYJqsCBvDU4SSR tWnw== 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 s14si9716791edr.264.2020.10.11.11.04.03; Sun, 11 Oct 2020 11:04:25 -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 S2387520AbgJKKCo (ORCPT + 99 others); Sun, 11 Oct 2020 06:02:44 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:27418 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725863AbgJKKCn (ORCPT ); Sun, 11 Oct 2020 06:02:43 -0400 X-IronPort-AV: E=Sophos;i="5.77,362,1596492000"; d="scan'208";a="471981617" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES256-SHA256; 11 Oct 2020 12:02:41 +0200 From: Julia Lawall To: sound-open-firmware@alsa-project.org Cc: =?UTF-8?q?Valdis=20Kl=C4=93tnieks?= , Joe Perches , Thomas Gleixner , kernel-janitors@vger.kernel.org, patches@opensource.cirrus.com, Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/8] use semicolons rather than commas to separate statements Date: Sun, 11 Oct 2020 11:19:31 +0200 Message-Id: <1602407979-29038-1-git-send-email-Julia.Lawall@inria.fr> X-Mailer: git-send-email 1.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These patches replace commas by semicolons. This was done using the Coccinelle semantic patch (http://coccinelle.lip6.fr/) shown below. This semantic patch ensures that commas inside for loop headers will not be transformed. It also doesn't touch macro definitions. Coccinelle ensures that braces are added as needed when a single-statement branch turns into a multi-statement one. This semantic patch has a few false positives, for variable delcarations such as: LIST_HEAD(x), *y; The semantic patch could be improved to avoid these, but for the moment they have been removed manually (2 occurrences). // @initialize:ocaml@ @@ let infunction p = (* avoid macros *) (List.hd p).current_element <> "something_else" let combined p1 p2 = (List.hd p1).line_end = (List.hd p2).line || (((List.hd p1).line_end < (List.hd p2).line) && ((List.hd p1).col < (List.hd p2).col)) @bad@ statement S; declaration d; position p; @@ S@p d // special cases where newlines are needed (hope for no more than 5) @@ expression e1,e2; statement S; position p != bad.p; position p1; position p2 : script:ocaml(p1) { infunction p1 && combined p1 p2 }; @@ - e1@p1,@S@p e2@p2; + e1; e2; @@ expression e1,e2; statement S; position p != bad.p; position p1; position p2 : script:ocaml(p1) { infunction p1 && combined p1 p2 }; @@ - e1@p1,@S@p e2@p2; + e1; e2; @@ expression e1,e2; statement S; position p != bad.p; position p1; position p2 : script:ocaml(p1) { infunction p1 && combined p1 p2 }; @@ - e1@p1,@S@p e2@p2; + e1; e2; @@ expression e1,e2; statement S; position p != bad.p; position p1; position p2 : script:ocaml(p1) { infunction p1 && combined p1 p2 }; @@ - e1@p1,@S@p e2@p2; + e1; e2; @@ expression e1,e2; statement S; position p != bad.p; position p1; position p2 : script:ocaml(p1) { infunction p1 && combined p1 p2 }; @@ - e1@p1,@S@p e2@p2; + e1; e2; @r@ expression e1,e2; statement S; position p != bad.p; @@ e1 ,@S@p e2; @@ expression e1,e2; position p1; position p2 : script:ocaml(p1) { infunction p1 && not(combined p1 p2) }; statement S; position r.p; @@ e1@p1 -,@S@p +; e2@p2 ... when any // --- sound/firewire/fireworks/fireworks_pcm.c | 2 +- sound/pci/hda/patch_ca0132.c | 2 +- sound/pci/hda/patch_hdmi.c | 2 +- sound/soc/codecs/madera.c | 4 ++-- sound/soc/codecs/wm8350.c | 3 ++- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- sound/soc/samsung/snow.c | 2 +- sound/soc/soc-dapm.c | 2 +- sound/soc/sof/intel/hda-dsp.c | 2 +- 9 files changed, 11 insertions(+), 10 deletions(-)