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=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT 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 7A7D0C4727D for ; Tue, 29 Sep 2020 13:57:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3220F221E7 for ; Tue, 29 Sep 2020 13:57:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730890AbgI2N5v (ORCPT ); Tue, 29 Sep 2020 09:57:51 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:47096 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729557AbgI2N5o (ORCPT ); Tue, 29 Sep 2020 09:57:44 -0400 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 Cc: =?UTF-8?q?Valdis=20Kl=C4=93tnieks?= , Joe Perches , Thomas Gleixner , kernel-janitors@vger.kernel.org, Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.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 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 // --- 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(-) From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julia Lawall Date: Tue, 29 Sep 2020 13:14:23 +0000 Subject: [PATCH 00/20] media: use semicolons rather than commas to separate statements Message-Id: <1601385283-26144-1-git-send-email-Julia.Lawall@inria.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-samsung-soc@vger.kernel.org Cc: =?UTF-8?q?Valdis=20Kl=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 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(-) 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=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 916C3C4727C for ; Tue, 29 Sep 2020 15:01:52 +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 0612A2075F for ; Tue, 29 Sep 2020 15:01:51 +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 0612A2075F 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+linux-arm-kernel=archiver.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-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=20Kl=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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.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(-) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel