From: Julia Lawall Date: Mon, 23 Jun 2008 21:12:31 +0000 (+0200) Subject: drivers/net/r6040.c: Eliminate double sizeof X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3f6602ad56dc538a846367bd6a05ac7ac4d3e641;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 858b191517b..504a48ff73c 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++;