From: Kumar Gala Date: Thu, 17 Jan 2008 06:02:10 +0000 (-0600) Subject: Remove duplicate defines for ARRAY_SIZE X-Git-Tag: v1.3.2-rc1~34 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3cfb0c51b2bb5ede54eca85ace5b1ba12be314b0;p=u-boot Remove duplicate defines for ARRAY_SIZE Signed-off-by: Kumar Gala --- diff --git a/cpu/arm926ejs/cpuinfo.c b/cpu/arm926ejs/cpuinfo.c index 8c9863161a..35ba7dba0f 100644 --- a/cpu/arm926ejs/cpuinfo.c +++ b/cpu/arm926ejs/cpuinfo.c @@ -18,8 +18,6 @@ #define omap_readw(x) *(volatile unsigned short *)(x) #define omap_readl(x) *(volatile unsigned long *)(x) -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) - #define OMAP_DIE_ID_0 0xfffe1800 #define OMAP_DIE_ID_1 0xfffe1804 #define OMAP_PRODUCTION_ID_0 0xfffe2000 diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c index 94e87cbf00..41aad3bd6a 100644 --- a/drivers/mtd/jedec_flash.c +++ b/drivers/mtd/jedec_flash.c @@ -218,10 +218,6 @@ static const struct amd_flash_info jedec_table[] = { #endif }; - -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) - - static inline void fill_info(flash_info_t *info, const struct amd_flash_info *jedec_entry, ulong base) { int i,j; diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c index 57ccbd964f..d71323f7f4 100644 --- a/drivers/net/rtl8169.c +++ b/drivers/net/rtl8169.c @@ -352,8 +352,6 @@ int mdio_read(int RegAddr) return value; } -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) - static int rtl8169_init_board(struct eth_device *dev) { int i; diff --git a/include/common.h b/include/common.h index c4ee3e2df6..75fb676458 100644 --- a/include/common.h +++ b/include/common.h @@ -665,4 +665,6 @@ void inline show_boot_progress (int val); #error Read section CONFIG_SKIP_LOWLEVEL_INIT in README. #endif +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + #endif /* __COMMON_H_ */