Category: Linux

drivers/net/smsc9420.c: remove exceptional & on function name

Author: Julia Lawall <julia@diku.dk> In this file, function names are otherwise used as pointers without &. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier f; @@ f(…) { … } @@ identifier r.f; @@ – &f + f // Signed-off-by: Julia Lawall Signed-off-by: David S. …

Continue reading

drivers/net/r6040.c: remove exceptional & on function name

Author: Julia Lawall <julia@diku.dk> In this file, function names are otherwise used as pointers without &. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier f; @@ f(…) { … } @@ identifier r.f; @@ – &f + f // Signed-off-by: Julia Lawall Signed-off-by: David S. …

Continue reading

drivers/net/pppol2tp.c: remove exceptional & on function name

Author: Julia Lawall <julia@diku.dk> In this file, function names are otherwise used as pointers without &. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier f; @@ f(…) { … } @@ identifier r.f; @@ – &f + f // Signed-off-by: Julia Lawall Signed-off-by: David S. …

Continue reading

drivers/net/irda: remove exceptional & on function name

Author: Julia Lawall <julia@diku.dk> In this file, function names are otherwise used as pointers without &. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier f; @@ f(…) { … } @@ identifier r.f; @@ – &f + f // Signed-off-by: Julia Lawall Signed-off-by: David S. …

Continue reading

drivers/net/ipg.c: remove exceptional & on function name

Author: Julia Lawall <julia@diku.dk> In this file, function names are otherwise used as pointers without &. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier f; @@ f(…) { … } @@ identifier r.f; @@ – &f + f // Signed-off-by: Julia Lawall Signed-off-by: David S. …

Continue reading

drivers/net: remove exceptional & on function name

Author: Julia Lawall <julia@diku.dk> In this file, function names are otherwise used as pointers without &. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier f; @@ f(…) { … } @@ identifier r.f; @@ – &f + f // Signed-off-by: Julia Lawall Signed-off-by: David S. …

Continue reading

drivers/net/can: remove exceptional & on function name

Author: Julia Lawall <julia@diku.dk> In this file, function names are otherwise used as pointers without &. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier f; @@ f(…) { … } @@ identifier r.f; @@ – &f + f // Signed-off-by: Julia Lawall Signed-off-by: David S. …

Continue reading

fs/qnx4: decrement sizeof size in strncmp

Author: Julia Lawall <julia@diku.dk> As an identical match is wanted in this case, strcmp can be used instead. The semantic match that lead to detecting this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression foo; constant char *abc; @@ *strncmp(foo, abc, sizeof(abc)) // Signed-off-by: Julia Lawall Signed-off-by: Anders Larsen Signed-off-by: Jiri Kosina — fs/qnx4/inode.c | …

Continue reading

perf tools: Move dereference after NULL test

Author: Julia Lawall <julia@diku.dk> In each case, if the NULL test on thread is needed, then the dereference should be after the NULL test. A simplified version of the semantic match that detects this problem is as follows (http://coccinelle.lip6.fr/): // @match exists@ expression x, E; identifier fld; @@ * x->fld … when != \(x = …

Continue reading

ARM: S3C24XX: arch/arm/plat-s3c24xx: Move dereference after NULL test

Author: Julia Lawall <julia@diku.dk> If the NULL test on buf is needed, then the dereference should be after the NULL test. A simplified version of the semantic match that detects this problem is as follows (http://coccinelle.lip6.fr/): // @match exists@ expression x, E; identifier fld; @@ * x->fld … when != \(x = E\|&x\) * x …

Continue reading