ARRAY_SIZE changes
authorStoyan Gaydarov <sgayda2@uiuc.edu>
Wed, 22 Jul 2009 03:02:33 +0000 (05:02 +0200)
committerJesper Nilsson <jesper.nilsson@axis.com>
Tue, 1 Sep 2009 15:38:50 +0000 (17:38 +0200)
These changes were a direct result of using a semantic patch
More information can be found at http://www.emn.fr/x-info/coccinelle/

Signed-off-by: Stoyan Gaydarov <sgayda2@uiuc.edu>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
arch/cris/arch-v32/mach-a3/io.c
arch/cris/arch-v32/mach-fs/io.c

index c22f67ecd9f37e2abd91d59131b9278968ebdcc0..090ceb99ef0ba92591c1cddbec326a1e4661e5d0 100644 (file)
@@ -36,7 +36,7 @@ struct crisv32_ioport crisv32_ioports[] = {
        },
 };
 
        },
 };
 
-#define NBR_OF_PORTS sizeof(crisv32_ioports)/sizeof(struct crisv32_ioport)
+#define NBR_OF_PORTS ARRAY_SIZE(crisv32_ioports)
 
 struct crisv32_iopin crisv32_led_net0_green;
 struct crisv32_iopin crisv32_led_net0_red;
 
 struct crisv32_iopin crisv32_led_net0_green;
 struct crisv32_iopin crisv32_led_net0_red;
index cb6327b1f8f826051a4ad975aa324d564b602500..a6958661fa8e0bbd1b2fde30d3c6de8764a404ed 100644 (file)
@@ -52,7 +52,7 @@ struct crisv32_ioport crisv32_ioports[] = {
        }
 };
 
        }
 };
 
-#define NBR_OF_PORTS sizeof(crisv32_ioports)/sizeof(struct crisv32_ioport)
+#define NBR_OF_PORTS ARRAY_SIZE(crisv32_ioports)
 
 struct crisv32_iopin crisv32_led_net0_green;
 struct crisv32_iopin crisv32_led_net0_red;
 
 struct crisv32_iopin crisv32_led_net0_green;
 struct crisv32_iopin crisv32_led_net0_red;