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
Catégorie : Linux
Aug 05 2010
net/atm: Adjust confusing if indentation
Author: Julia Lawall <julia@diku.dk> Outdent the code following 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
Aug 05 2010
drivers/net/wan: 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
Aug 04 2010
drivers/staging/iio: call mutex_unlock in error handling code
Author: Julia Lawall <julia@diku.dk> Adjust the error handling code so that it benefits from the call to mutex_unlock at the end of the function. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @rcu exists@ position p1; expression E; @@ mutex_lock@p1(E); … mutex_unlock(E); @exists@ position rcu.p1; expression E; @@ *mutex_lock@p1(E); … when …
Aug 04 2010
IB/ehca: Drop unnecessary NULL test
Author: Julia Lawall <julia@diku.dk> list_for_each_entry binds its first argument to a non-null value, and thus any null test on the value of that argument is superfluous. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ iterator I; expression x; statement S,S1,S2; @@ I(x,…) { } // Signed-off-by: Julia Lawall Acked-by: Alexander …
Aug 04 2010
staging: Drop unnecessary null test
Author: Julia Lawall <julia@diku.dk> list_for_each_entry binds its first argument to a non-null value, and thus any null test on the value of that argument is superfluous. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ iterator I; expression x; statement S; @@ I(x,…) { } // Signed-off-by: Julia Lawall Signed-off-by: Greg …
Aug 04 2010
fs/dlm: Drop unnecessary null test
Author: Julia Lawall <julia@diku.dk> hlist_for_each_entry binds its first argument to a non-null value, and thus any null test on the value of that argument is superfluous. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ iterator I; expression x,E,E1,E2; statement S,S1,S2; @@ I(x,…) { } // Signed-off-by: Julia Lawall Signed-off-by: David …
Aug 03 2010
powerpc/pci: Drop unnecessary null test
Author: Julia Lawall <julia@diku.dk> list_for_each_entry binds its first argument to a non-null value, and thus any null test on the value of that argument is superfluous. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ iterator I; expression x,E,E1,E2; statement S,S1,S2; @@ I(x,…) { } // Signed-off-by: Julia Lawall Signed-off-by: Benjamin …
Aug 03 2010
powerpc/powermac: Drop unnecessary null test
Author: Julia Lawall <julia@diku.dk> for_each_node_by_name binds its first argument to a non-null value, and thus any null test on the value of that argument is superfluous. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ iterator I; expression x,E; @@ I(x,…) { } // Signed-off-by: Julia Lawall Signed-off-by: Benjamin Herrenschmidt — …
Aug 03 2010
powerpc/powermac: Drop unnecessary of_node_put
Author: Julia Lawall <julia@diku.dk> for_each_node_by_name only exits when its first argument is NULL, and a subsequent call to of_node_put on that argument is unnecessary. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ iterator name for_each_node_by_name; expression np,E; identifier l; @@ for_each_node_by_name(np,…) { … when != break; when != goto l; …