* [U-Boot-Users] [PATCH] Remove duplicate defines for ARRAY_SIZE
@ 2008-02-18 14:18 Kumar Gala
2008-02-22 11:37 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Kumar Gala @ 2008-02-18 14:18 UTC (permalink / raw)
To: u-boot
A few duplicate of the ARRAY_SIZE macro sneaked in since we put
the define in common.h.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
include/asm-ppc/fsl_law.h | 1 -
include/asm-ppc/mmu.h | 1 -
2 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/include/asm-ppc/fsl_law.h b/include/asm-ppc/fsl_law.h
index 23bd505..e955c75 100644
--- a/include/asm-ppc/fsl_law.h
+++ b/include/asm-ppc/fsl_law.h
@@ -3,7 +3,6 @@
#include <asm/io.h>
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#define SET_LAW_ENTRY(idx, a, sz, trgt) \
{ .index = idx, .addr = a, .size = sz, .trgt_id = trgt }
diff --git a/include/asm-ppc/mmu.h b/include/asm-ppc/mmu.h
index ec1ca53..5af22af 100644
--- a/include/asm-ppc/mmu.h
+++ b/include/asm-ppc/mmu.h
@@ -427,7 +427,6 @@ extern void disable_tlb(u8 esel);
extern void invalidate_tlb(u8 tlb);
extern void init_tlbs(void);
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#define SET_TLB_ENTRY(_tlb, _epn, _rpn, _perms, _wimge, _ts, _esel, _sz, _iprot) \
{ .tlb = _tlb, .epn = _epn, .rpn = _rpn, .perms = _perms, \
.wimge = _wimge, .ts = _ts, .esel = _esel, .tsize = _sz, .iprot = _iprot }
--
1.5.3.8
^ permalink raw reply related [flat|nested] 4+ messages in thread* [U-Boot-Users] [PATCH] Remove duplicate defines for ARRAY_SIZE
2008-02-18 14:18 [U-Boot-Users] [PATCH] Remove duplicate defines for ARRAY_SIZE Kumar Gala
@ 2008-02-22 11:37 ` Wolfgang Denk
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2008-02-22 11:37 UTC (permalink / raw)
To: u-boot
In message <Pine.LNX.4.64.0802180817450.25588@blarg.am.freescale.net> you wrote:
> A few duplicate of the ARRAY_SIZE macro sneaked in since we put
> the define in common.h.
>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Applied, thanks.
Best regards,
Wolfgang Denk
--
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
Your csh still thinks true is false. Write to your vendor today and
tell them that next year Configure ought to "rm /bin/csh" unless they
fix their blasted shell. :-)
- Larry Wall in Configure from the perl distribution
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] [PATCH] Remove duplicate defines for ARRAY_SIZE
@ 2008-01-17 6:02 Kumar Gala
2008-02-13 23:43 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Kumar Gala @ 2008-01-17 6:02 UTC (permalink / raw)
To: u-boot
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
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(-)
diff --git a/cpu/arm926ejs/cpuinfo.c b/cpu/arm926ejs/cpuinfo.c
index 8c98631..35ba7db 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 94e87cb..41aad3b 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 57ccbd9..d71323f 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 54083f1..0813a11 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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_ */
--
1.5.3.7
^ permalink raw reply related [flat|nested] 4+ messages in thread* [U-Boot-Users] [PATCH] Remove duplicate defines for ARRAY_SIZE
2008-01-17 6:02 Kumar Gala
@ 2008-02-13 23:43 ` Wolfgang Denk
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2008-02-13 23:43 UTC (permalink / raw)
To: u-boot
In message <Pine.LNX.4.64.0801170001500.27520@blarg.am.freescale.net> you wrote:
>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
> 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
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-22 11:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-18 14:18 [U-Boot-Users] [PATCH] Remove duplicate defines for ARRAY_SIZE Kumar Gala
2008-02-22 11:37 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2008-01-17 6:02 Kumar Gala
2008-02-13 23:43 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox