drivers/net/r6040.c: Eliminate double sizeof
Subsystems (3)
PATCH 1/1 drivers/net/r6040.c: Eliminate double sizeof
From: Julia Lawall <[email protected]>
Taking sizeof the result of sizeof is quite strange and does not seem to be what is wanted here.
This was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@
expression E;
@@
- sizeof (
sizeof (E)
- )
// </smpl>
---
drivers/net/r6040.c 2008-06-23 22:55:11.000000000 +0200 renamed from drivers/net/r6040.c 2008-06-17 19:46:52.000000000 +0200 +1 -1
@@ -273,7 +273,7 @@ static void r6040_init_ring_desc(struct dma_addr_t mapping = desc_dma; while (size-- > 0) { - mapping += sizeof(sizeof(*desc)); + mapping += sizeof(*desc); desc->ndesc = cpu_to_le32(mapping); desc->vndescp = desc + 1; desc++;
Hello Julia,
Le Monday 23 June 2008 23:12:31 Julia Lawall, vous avez écrit :
Quoted 4 lines
From: Julia Lawall <[email protected]>
Taking sizeof the result of sizeof is quite strange and does not seem to be what is wanted here.
Yes, definitively.
Quoted 1 line
Signed-off-by Julia Lawall <[email protected]>
Signature · 6 lines
Cordialement, Florian Fainelli ------------------------------ -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Jeff Garzik
AppliedQuoted 13 lines · Julia Lawall
From: Julia Lawall <[email protected]>
Taking sizeof the result of sizeof is quite strange and does not seem to be what is wanted here.
This was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)// <smpl>
@@
expression E;
@@
Quoted 6 lines
- sizeof (
sizeof (E)
- )
// </smpl>Signed-off-by Julia Lawall <[email protected]>
applied