Author: Peter Senna Tschudin <peter.senna@gmail.com> This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // @@ type T; constant C; identifier …
Catégorie : Linux
May 20 2014
staging: ft1000: Remove useless return variables
Author: Peter Senna Tschudin <peter.senna@gmail.com> This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // @@ type T; constant C; identifier …
May 20 2014
staging: wlags49_h2: wl_priv: Remove useless return variables
Author: Peter Senna Tschudin <peter.senna@gmail.com> This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // @@ type T; constant C; identifier …
May 20 2014
staging: r8712u: Remove useless return variables
Author: Peter Senna Tschudin <peter.senna@gmail.com> This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // @@ type T; constant C; identifier …
May 20 2014
wimax/i2400m: make return of 0 explicit
Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete unnecessary local variable whose value is always 0 and that hides the fact that the result is always 0. A simplified version of the semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ local idexpression ret; expression e; position p; @@ -ret = 0; … when …
May 19 2014
ieee802154: Introduce the use of the managed version of kzalloc
Author: Himangi Saraogi <himangi774@gmail.com> This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. An explicit linux/device.h include is added to make sure the devm_*() routine declarations are unambiguously available. The following Coccinelle semantic patch was used for making the change: @platform@ …
May 19 2014
atm: idt77252: Remove redundant error check
Author: Peter Senna Tschudin <peter.senna@gmail.com> Remove double checks, convert printk to pr_warn, and move the call to pr_warn to the first check. The simplified version of the coccinelle semantic patch that find this issue is as follows: // @@ expression E; identifier pr; expression list es; @@ while(…){ … – if (E) break; + if …
May 19 2014
brcmsmac: make return of 0 explicit
Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete unnecessary local variable whose value is always 0 and that hides the fact that the result is always 0. A simplified version of the semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ local idexpression ret; expression e; position p; @@ -ret = 0; … when …
May 19 2014
ARM: imx: fix error handling in ipu device registration
Author: Emil Goode <emilgoode@gmail.com> If we fail to allocate struct platform_device pdev we dereference it after the goto label err. This bug was found using coccinelle. Fixes: afa77ef (ARM: mx3: dynamically allocate « ipu-core » devices) Signed-off-by: Emil Goode Acked-by: Uwe Kleine-König Cc: Signed-off-by: Shawn Guo Signed-off-by: Olof Johansson — arch/arm/mach-imx/devices/platform-ipu-core.c | 2 +- 1 file changed, …
May 19 2014
s390/oprofile: make return of 0 explicit
Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete unnecessary local variable whose value is always 0 and that hides the fact that the result is always 0. A simplified version of the semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ local idexpression ret; expression e; position p; @@ -ret = 0; … when …