Explorar o código

arch/powerpc: 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/)

// <smpl>
@@
expression E;
@@

- sizeof (
  sizeof (E)
- )

@@
type T;
@@

- sizeof (
  sizeof (T)
- )
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Julia Lawall %!s(int64=16) %!d(string=hai) anos
pai
achega
08c6e3a578
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/powerpc/platforms/82xx/pq2ads-pci-pic.c

+ 1 - 1
arch/powerpc/platforms/82xx/pq2ads-pci-pic.c

@@ -186,7 +186,7 @@ out_unmap_regs:
 	iounmap(priv->regs);
 	iounmap(priv->regs);
 out_free_bootmem:
 out_free_bootmem:
 	free_bootmem((unsigned long)priv,
 	free_bootmem((unsigned long)priv,
-	             sizeof(sizeof(struct pq2ads_pci_pic)));
+	             sizeof(struct pq2ads_pci_pic));
 	of_node_put(np);
 	of_node_put(np);
 out_unmap_irq:
 out_unmap_irq:
 	irq_dispose_mapping(irq);
 	irq_dispose_mapping(irq);