From: Mark Brown Date: Mon, 26 Oct 2020 18:37:12 +0000 (+0000) Subject: Merge series "use semicolons rather than commas to separate statements" from Julia... X-Git-Tag: accepted/tizen/unified/20230118.172025~7834^2~15^2~203 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c9c0076146b5abc70c4f9a830c0529229ae7b49;p=platform%2Fkernel%2Flinux-rpi.git Merge series "use semicolons rather than commas to separate statements" from Julia Lawall : 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(-) --- 9c9c0076146b5abc70c4f9a830c0529229ae7b49