Category: Linux

perf timechart: 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

sound/oss: 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

[SCSI] drivers/message/fusion: 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

drivers/net/wireless/ath/ath9k: 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

drivers/net/wireless/prism54: 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

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 (…) { …

Continue reading

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 …

Continue reading

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

[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

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 …

Continue reading