From patchwork Tue Sep 29 13:14:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 11806197 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B1753112E for ; Tue, 29 Sep 2020 15:02:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 706B42075F for ; Tue, 29 Sep 2020 15:02:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tm50gneo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 706B42075F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=inria.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=r9oka26ytEtF2E6dmlRp+XGZxmaAXQHMuUFYa9kE/oY=; b=tm50gneohbfzHsE35PMj4RawGN mPxK9TQZxJwQXXk0E7R6+B2SrXOVWHo5+LKzpwKF5H5sZkYlQEiveHS+2FLIKKGhVj2+FhfKDWJgI E7Oc3s3k41ypqSfcAA6EtZ1Qj+vu7TZcZvN3G71P578QtxEZK3AZ6os9/lVS4piZRJDzBVHn6M2Gf vmAPhP3VnoecXeFZc8A6DC8td/RQ3AO4UC7EdLBs3in6m/8buherzUGA9MXpAFVg6UwvOylyVpZku 8QOcZ5Ou5LDvGne0C3jNpaCap67E9Xj6GrItFmUd8h/Pxc3iAXgFs4XB4w3Wbb3EZtpBGCkcOXJbw dTXUUC6A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNH7V-0007IP-Dk; Tue, 29 Sep 2020 15:00:45 +0000 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNG8Z-0001Lx-OS for linux-arm-kernel@lists.infradead.org; Tue, 29 Sep 2020 13:57:54 +0000 X-IronPort-AV: E=Sophos;i="5.77,318,1596492000"; d="scan'208";a="470079946" Received: from palace.lip6.fr ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES256-SHA256; 29 Sep 2020 15:57:40 +0200 From: Julia Lawall To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 00/20] media: use semicolons rather than commas to separate statements Date: Tue, 29 Sep 2020 15:14:23 +0200 Message-Id: <1601385283-26144-1-git-send-email-Julia.Lawall@inria.fr> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200929_095748_620491_FD88DBFE X-CRM114-Status: GOOD ( 11.81 ) X-Spam-Score: -5.0 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [192.134.164.83 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [192.134.164.83 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Valdis_Kl=C4=93tnieks?= , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Joe Perches , Thomas Gleixner , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 // --- drivers/media/dvb-frontends/m88ds3103.c | 6 ++--- drivers/media/dvb-frontends/rtl2832.c | 14 ++++++------ drivers/media/dvb-frontends/ts2020.c | 10 ++++----- drivers/media/i2c/msp3400-kthreads.c | 12 +++++++--- drivers/media/pci/bt8xx/bttv-cards.c | 6 +++-- drivers/media/pci/saa7134/saa7134-video.c | 7 ++++-- drivers/media/platform/coda/coda-common.c | 2 - drivers/media/platform/exynos4-is/fimc-core.c | 6 +++-- drivers/media/platform/s3c-camif/camif-core.c | 6 +++-- drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c | 2 - drivers/media/radio/radio-sf16fmr2.c | 2 - drivers/media/tuners/mt2060.c | 2 - drivers/media/usb/au0828/au0828-video.c | 2 - drivers/media/usb/dvb-usb-v2/dvbsky.c | 22 ++++++++++---------- drivers/media/usb/dvb-usb-v2/lmedm04.c | 2 - drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 4 +-- drivers/media/usb/dvb-usb/dib0700_devices.c | 4 +-- drivers/media/usb/em28xx/em28xx-audio.c | 14 ++++++------ drivers/media/usb/gspca/ov534.c | 12 +++++----- drivers/media/usb/pvrusb2/pvrusb2-devattr.c | 2 - 20 files changed, 75 insertions(+), 62 deletions(-)