From: Julia Lawall Date: Mon, 23 Jun 2008 21:12:31 +0000 (+0200) Subject: drivers/net/r6040.c: Eliminate double sizeof X-Git-Tag: v2.6.26-rc9~84^2~38 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f6602ad56dc538a846367bd6a05ac7ac4d3e641;p=linux-2.6 drivers/net/r6040.c: Eliminate double sizeof 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/) // @@ expression E; @@ - sizeof ( sizeof (E) - ) // Signed-off-by: Julia Lawall Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 858b191517..504a48ff73 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c @@ -273,7 +273,7 @@ static void r6040_init_ring_desc(struct r6040_descriptor *desc_ring, 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++;