Author: Julia Lawall <julia@diku.dk> Indent the branch of an if. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (…) { … } | if (…) S1@p1 S2@p2 ) @script:python@ p1
Aug 06 2010
drivers/platform/x86: Adjust confusing if indentation
Author: Julia Lawall <julia@diku.dk> The assignment of ret to -EIO appears to only make sense if the branch that it is aligned with is executed, so move it into that branch. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (…) { …
Aug 06 2010
drivers/net/wireless/libertas: Adjust confusing if indentation
Author: Julia Lawall <julia@diku.dk> At the point of the patched code, err has already been tested, so it is only worthwhile to test it again in the if branches where it is changed. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if …
Aug 06 2010
PCI: Adjust confusing if indentation in pcie_get_readrq
Author: Julia Lawall <julia@diku.dk> Indent the branch of an if. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (…) { … } | if (…) S1@p1 S2@p2 ) @script:python@ p1
Aug 06 2010
[CPUFREQ] drivers/cpufreq: Adjust confusing if indentation
Author: Julia Lawall <julia@diku.dk> Indent the body of for_each_cpu. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (…) { … } | if (…) S1@p1 S2@p2 ) @script:python@ p1
Aug 06 2010
V4L/DVB: drivers/media/video: Adjust confusing if indentation
Author: Julia Lawall <julia@diku.dk> In cx23885/cx23885-video.c, cx88/cx88-video.c, davinci/vpif_capture.c, and davinci/vpif_display.c, group the aligned code into a single if branch. In saa7134/saa7134-video.c, outdent the code following the if. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (…) { … } | if …
Aug 06 2010
[SCSI] drivers/scsi: Adjust confusing if indentation
Author: Julia Lawall <julia@diku.dk> Outdent the code following the if. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (…) { … } | if (…) S1@p1 S2@p2 ) @script:python@ p1
Aug 06 2010
MIPS: kspd: Adjust confusing if indentation
Author: Julia Lawall <julia@diku.dk> Indent the branch of an if. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (…) { … } | if (…) S1@p1 S2@p2 ) @script:python@ p1
Aug 05 2010
net/decnet: Adjust confusing if indentation
Author: Julia Lawall <julia@diku.dk> Indent the branch of an if. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (…) { … } | if (…) S1@p1 S2@p2 ) @script:python@ p1
Aug 05 2010
drivers/isdn: Adjust confusing if indentation
Author: Julia Lawall <julia@diku.dk> In hisax/hfc_sx.c and mISDN/l1oip_core.c, the code after the if is outdented so that it is not aligned with the if branch. In mISDN/dsp_cmx.c, an else is added between the original if branch and the following statement, in line with the code following it. Without this change, the first assignment to dsp->rx_W …