Author: Julia Lawall <Julia.Lawall@lip6.fr> IO_DATA_PATH_WIDTH_8 is 0, so a bit-and with it is always false. The value IO_DATA_PATH_WIDTH covers the bits of the IO_DATA_PATH constants, so first pick those bits and then make the test using !=. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). Signed-off-by: Julia Lawall Signed-off-by: David S. Miller — drivers/ide/ide-cs.c | 3 …
Catégorie : Linux
Jun 08 2012
fs/direct-io.c: adjust suspicious bit operation
Author: Julia Lawall <Julia.Lawall@lip6.fr> READ is 0, so the result of the bit-and operation is 0. Rewrite with == as done elsewhere in the same file. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). Signed-off-by: Julia Lawall Reviewed-by: Jeff Moyer Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Al Viro — fs/direct-io.c | 2 +- 1 file …
Jun 07 2012
drivers/ata/pata_pcmcia.c: adjust suspicious bit operation
Author: Julia Lawall <Julia.Lawall@lip6.fr> IO_DATA_PATH_WIDTH_8 is 0, so a bit-and with it is always false. The value IO_DATA_PATH_WIDTH covers the bits of the IO_DATA_PATH constants, so first pick those bits and then make the test using !=. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). Signed-off-by: Julia Lawall Signed-off-by: Jeff Garzik — drivers/ata/pata_pcmcia.c | 3 ++- …
Jun 07 2012
drivers/staging/comedi/drivers/me4000.c: adjust suspicious bit operation
Author: Julia Lawall <Julia.Lawall@lip6.fr> TRIG_ROUND_NEAREST is 0, so a bit-and with it is always false. The value TRIG_ROUND_MASK covers the bits of the TRIG_ROUND constants, so first pick those bits and then make the test using ==. The same is done for TRIG_ROUND_UP for symmetry, even though bit-and would be sufficient in this case. This …
Jun 04 2012
drivers: net: Remove casts to same type
Author: Joe Perches <joe@perches.com> Adding casts of objects to the same type is unnecessary and confusing for a human reader. For example, this cast: int y; int *p = (int *)&y; I used the coccinelle script below to find and remove these unnecessary casts. I manually removed the conversions this script produces of casts with …
Jun 04 2012
wireless: Remove casts to same type
Author: Joe Perches <joe@perches.com> Adding casts of objects to the same type is unnecessary and confusing for a human reader. For example, this cast: int y; int *p = (int *)&y; I used the coccinelle script below to find and remove these unnecessary casts. I manually removed the conversions this script produces of casts with …
Jun 04 2012
ethernet: Remove casts to same type
Author: Joe Perches <joe@perches.com> Adding casts of objects to the same type is unnecessary and confusing for a human reader. For example, this cast: int y; int *p = (int *)&y; I used the coccinelle script below to find and remove these unnecessary casts. I manually removed the conversions this script produces of casts with …
Jun 03 2012
net: Remove casts to same type
Author: Joe Perches <joe@perches.com> Adding casts of objects to the same type is unnecessary and confusing for a human reader. For example, this cast: int y; int *p = (int *)&y; I used the coccinelle script below to find and remove these unnecessary casts. I manually removed the conversions this script produces of casts with …
May 08 2012
wireless: Convert compare_ether_addr to ether_addr_equal by hand
Author: Joe Perches <joe@perches.com> spatch/coccinelle isn’t perfect. It doesn’t understand __aligned(x) and doesn’t convert functions it can’t parse. Convert the remaining compare_ether_addr uses. Signed-off-by: Joe Perches Signed-off-by: David S. Miller — net/wireless/util.c | 6 +++— 1 file changed, 3 insertions(+), 3 deletions(-) diff –git a/net/wireless/util.c b/net/wireless/util.c index 3ba366f..1cd2558 100644 — a/net/wireless/util.c +++ b/net/wireless/util.c @@ …
May 08 2012
mac80211: Convert compare_ether_addr to ether_addr_equal by hand
Author: Joe Perches <joe@perches.com> spatch/coccinelle isn’t perfect. It doesn’t understand __aligned(x) and doesn’t convert functions it can’t parse. Convert the remaining compare_ether_addr uses. Signed-off-by: Joe Perches Signed-off-by: David S. Miller — net/mac80211/rx.c | 4 ++– net/mac80211/sta_info.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff –git a/net/mac80211/rx.c b/net/mac80211/rx.c index 26bfd6f..d722c40 100644 — …