Articles de cet auteur
Nov 18 2009
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. …
Nov 18 2009
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. …
Nov 18 2009
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. …
Nov 13 2009
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 | …
Oct 17 2009
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 = …
Oct 17 2009
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 …
Oct 17 2009
drivers/ata/libata: Move dereference after NULL test
Author: Julia Lawall <julia@diku.dk> In each case, if the NULL test on qc is needed, then the derefernce 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 = …
Oct 17 2009
ACPI: Move dereference after NULL test
Author: Julia Lawall <julia@diku.dk> If the NULL test on pr 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 …
Oct 17 2009
ALSA: sound/parisc: Move dereference after NULL test
Author: Julia Lawall <julia@diku.dk> If the NULL test on h is needed in snd_harmony_mixer_init, then the dereference should be after the NULL test. Actually, there is a sequence of calls: snd_harmony_create, then snd_harmony_pcm_init, and then snd_harmony_mixer_init. snd_harmony_create initializes h, but may indeed leave it as NULL. There was no NULL test at the beginning of …
Oct 17 2009
ALSA: sound: Move dereference after NULL test and drop unnecessary NULL tests
Author: Julia Lawall <julia@diku.dk> In pcm.c, if the NULL test on pcm is needed, then the dereference should be after the NULL test. In dummy.c and ali5451.c, the context of the calls to snd_card_dummy_new_mixer and snd_ali_free_voice show that dummy and pvoice, respectively cannot be NULL. A simplified version of the semantic match that detects this …