Catégorie : Linux

staging: rtl8192e: make return of 0 explicit

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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; @@ …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite