Author: Julia Lawall <Julia.Lawall@lip6.fr> Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = …
Category: Linux
Apr 05 2015
[media] si4713: fix error return code
Author: Julia Lawall <Julia.Lawall@lip6.fr> Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = …
Apr 05 2015
wan: lmc: fix error return code
Author: Julia Lawall <julia.lawall@lip6.fr> Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = …
Apr 04 2015
staging: emxx_udc: test returned value
Author: Julia Lawall <Julia.Lawall@lip6.fr> Put NULL test on the result of the previous call instead on one of its arguments. A simplified version of the semantic match that finds this problem is as follows (http://coccinelle.lip6.fr/): // r@ expression *e1; expression *e2; identifier f; statement S1,S2; @@ e1 = f(…,e2,…); ( if (e1 == NULL || …
Apr 04 2015
clk: versatile: test returned value
Author: Julia Lawall <Julia.Lawall@lip6.fr> Put NULL test on the result of the previous call instead on one of its arguments. A simplified version of the semantic match that finds this problem is as follows (http://coccinelle.lip6.fr/): // r@ expression *e1; expression *e2; identifier f; statement S1,S2; @@ e1 = f(…,e2,…); ( if (e1 == NULL || …
Apr 02 2015
staging: lustre: include: replace OBD_CHECK_DEV_ACTIVE by obd_check_dev_active
Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Static inline functions are preferred over macros. The inline function obd_check_dev_active is introduced to replace OBD_CHECK_DEV_ACTIVE. All functions that call obd_check_dev_active store the return values and return them if they represent an error code. Some of the changes were carried out manually while others were done using coccinelle. Signed-off-by: Aya Mahfouz …
Apr 02 2015
staging: lustre: include: replace OBD_CHECK_DEV by obd_check_dev
Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Static inline functions are preferred over macros. Hence, the function obd_check_dev was introduced. obd_check_dev replaces the macro OBD_CHECK_DEV. All functions that call obd_check_dev store the return values and return them if they represent an error code. Some of the changes were carried out manually while others were done using coccinelle. Signed-off-by: …
Apr 02 2015
Staging: sm750fb: Remove zero testing pointer typed value
Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Removes variable comparison with 0. Done using following coccinelle script. @ disable is_zero,isnt_zero @ expression *E; expression E1,f; @@ E = f(…) ?E = E1 @ disable is_zero,isnt_zero @ expression *E; @@ ( E == – 0 + NULL | E != – 0 + NULL | – 0 + …
Mar 31 2015
Staging: rtl8712: Remove zero-testing pointer typed value
Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Removes variable comparison with 0 by using !. Done using following coccinelle script. @ disable is_zero,isnt_zero @ expression *E; expression E1,f; @@ E = f(…) ?E = E1 @ disable is_zero,isnt_zero @ expression *E; @@ ( E == – 0 + NULL | E != – 0 + NULL | …
Mar 31 2015
tty: remove buf parameter from tty_name()
Author: Rasmus Villemoes <linux@rasmusvillemoes.dk> tty_name no longer uses the buf parameter, so remove it along with all the 64 byte stack buffers that used to be passed in. Mostly generated by the coccinelle script @depends on patch@ identifier buf; constant C; expression tty; @@ – char buf[C]; allmodconfig compiles, so I’m fairly confident the stack …