Catégorie : Linux

drivers/ide/ide-cs.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: David S. Miller — drivers/ide/ide-cs.c | 3 …

Lire la suite

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 …

Lire la suite

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 ++- …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 @@ …

Lire la suite

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 — …

Lire la suite

BtrLinux
Résumé de la politique de confidentialité

Ce site utilise des cookies afin que nous puissions vous fournir la meilleure expérience utilisateur possible. Les informations sur les cookies sont stockées dans votre navigateur et remplissent des fonctions telles que vous reconnaître lorsque vous revenez sur notre site Web et aider notre équipe à comprendre les sections du site que vous trouvez les plus intéressantes et utiles.