瀏覽代碼

ARRAY_SIZE changes

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>
Stoyan Gaydarov 16 年之前
父節點
當前提交
62f589c5e3
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      arch/cris/arch-v32/mach-a3/io.c
  2. 1 1
      arch/cris/arch-v32/mach-fs/io.c

+ 1 - 1
arch/cris/arch-v32/mach-a3/io.c

@@ -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_green;
 struct crisv32_iopin crisv32_led_net0_red;
 struct crisv32_iopin crisv32_led_net0_red;

+ 1 - 1
arch/cris/arch-v32/mach-fs/io.c

@@ -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_green;
 struct crisv32_iopin crisv32_led_net0_red;
 struct crisv32_iopin crisv32_led_net0_red;