Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete unnecessary use of a local variable to immediately return 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 != ret = e return – ret + 0 …
Catégorie : Linux
May 19 2014
sound: mpu401.c: 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
staging: wlags49_h2: 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
usb: gadget: 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 17 2014
video: delete unneeded call to platform_get_drvdata
Author: Julia Lawall <Julia.Lawall@lip6.fr> Platform_get_drvdata is an accessor function, and has no purpose if its result is not used. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; type T; @@ – T x = platform_get_drvdata(…); … when != x // Signed-off-by: Julia Lawall Signed-off-by: Tomi Valkeinen — drivers/video/fbdev/bf54x-lq043fb.c …
May 16 2014
staging/rtl8192u: Put EXPORT_SYMBOL just after the exported function
Author: Benoit Taine <benoit.taine@lip6.fr> Export of symbols statement must be placed right after the definition to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // @ r @ identifier f; @@ – EXPORT_SYMBOL(f); @@ identifier r.f; @@ …
May 15 2014
vti6: delete unneeded call to netdev_priv
Author: Julia Lawall <Julia.Lawall@lip6.fr> Netdev_priv is an accessor function, and has no purpose if its result is not used. A simplified version of the semantic match that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ local idexpression x; @@ -x = netdev_priv(…); … when != x // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller …
May 15 2014
ip_tunnel: delete unneeded call to netdev_priv
Author: Julia Lawall <Julia.Lawall@lip6.fr> Netdev_priv is an accessor function, and has no purpose if its result is not used. A simplified version of the semantic match that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ local idexpression x; @@ -x = netdev_priv(…); … when != x // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller …
May 15 2014
net/ariadne: delete unneeded call to netdev_priv
Author: Julia Lawall <Julia.Lawall@lip6.fr> Netdev_priv is an accessor function, and has no purpose if its result is not used. A simplified version of the semantic match that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ local idexpression x; @@ -x = netdev_priv(…); … when != x // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller …
May 15 2014
drivers/net/wan: delete unneeded call to netdev_priv
Author: Julia Lawall <Julia.Lawall@lip6.fr> Netdev_priv is an accessor function, and has no purpose if its result is not used. A simplified version of the semantic match that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ local idexpression x; @@ -x = netdev_priv(…); … when != x // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller …