Skip to contentSkip to conversation

Remove duplicate defines for ARRAY_SIZE

PATCH New Kumar Gala 2 participants 2 messages Jan 17, 2008 – Feb 13, 2008

Subsystems (2)
lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 Remove duplicate defines for ARRAY_SIZE

---
 cpu/arm926ejs/cpuinfo.c   |    2 --
 drivers/mtd/jedec_flash.c |    4 ----
 drivers/net/rtl8169.c     |    2 --
 include/common.h          |    2 ++
 4 files changed, 2 insertions(+), 8 deletions(-)
cpu/arm926ejs/cpuinfo.c +0 -2
index 8c98631..35ba7db 100644
@@ -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
drivers/mtd/jedec_flash.c +0 -4
index 94e87cb..41aad3b 100644
@@ -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;
drivers/net/rtl8169.c +0 -2
index 57ccbd9..d71323f 100644
@@ -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;
include/common.h +2 -0
index 54083f1..0813a11 100644
@@ -663,4 +663,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_ */
Signature · 1 line
1.5.3.7
#1 lore raw

PATCH 1/1 Remove duplicate defines for ARRAY_SIZE

Quoted 8 lines · In message <[email protected]> you wrote:
---
 cpu/arm926ejs/cpuinfo.c   |    2 --
 drivers/mtd/jedec_flash.c |    4 ----
 drivers/net/rtl8169.c     |    2 --
 include/common.h          |    2 ++
 4 files changed, 2 insertions(+), 8 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A verbal contract isn't worth the paper it's written on.
                                                    -- Samuel Goldwyn