blackfin, powerpc: remove redundant definitions of ARRAY_SIZE
PATCH 1/1 blackfin, powerpc: remove redundant definitions of ARRAY_SIZE
Since ARRAY_SIZE macro is defined in include/common.h, re-defining it in arch-specific files is redundant.
---
I built all Blackfin and Powerpc boards.
I confirmed this patch has no bad impact.
arch/blackfin/include/asm/config-pre.h | 3 --- arch/powerpc/cpu/ppc4xx/speed.c | 2 -- 2 files changed, 5 deletions(-)
arch/blackfin/include/asm/config-pre.h +0 -3
@@ -9,9 +9,6 @@#ifndef __ASM_BLACKFIN_CONFIG_PRE_H__#define __ASM_BLACKFIN_CONFIG_PRE_H__ -/* Misc helper functions */ -#define ARRAY_SIZE (x) (sizeof(x) / sizeof((x)[0])) -/* Bootmode defines -- your config needs to select this via CONFIG_BFIN_BOOT_MODE. * Depending on your cpu, some of these may not be valid, check your HRM. * The actual values here are meaningless as long as they're unique.
arch/powerpc/cpu/ppc4xx/speed.c +0 -2
@@ -19,8 +19,6 @@ DECLARE_GLOBAL_DATA_PTR; #define DEBUGF(fmt,args...)#endif -#define ARRAY_SIZE (x) (sizeof(x) / sizeof((x)[0])) -#if defined(CONFIG_405GP )void get_sys_info (PPC4xx_SYS_INFO * sysInfo)
Signature · 1 line
1.9.1
PATCH 1/1 blackfin, powerpc: remove redundant definitions of ARRAY_SIZE
Quoted 6 lines · Masahiro Yamada
Since
ARRAY_SIZEmacro is defined ininclude/common.h, re-defining it in arch-specific files is redundant.Signed-off-by Masahiro Yamada <[email protected]>Cc Stefan Roese <[email protected]>Cc Sonic Zhang <[email protected]>
Thanks for catching this.
Thanks,
Stefan
Zhang
PATCH 1/1 blackfin, powerpc: remove redundant definitions of ARRAY_SIZE
In reply to Masahiro YamadaThanks,
Sonic
Quoted 53 lines
-----Original Message-----
From: Masahiro Yamada [mailto:yamada.m at jp.panasonic.com]
Sent: Thursday, July 03, 2014 12:56 PM
To: u-boot at lists.denx.de
Cc: Masahiro Yamada; Stefan Roese; Zhang, Sonic
Subject: [PATCH] blackfin,powerpc: remove redundant definitions ofARRAY_SIZESince
ARRAY_SIZEmacro is defined ininclude/common.h, re-defining it in arch- specific files is redundant.Signed-off-by Masahiro Yamada <[email protected]>Cc Stefan Roese <[email protected]>Cc Sonic Zhang <[email protected]>---
I built all Blackfin and Powerpc boards.
I confirmed this patch has no bad impact.
arch/blackfin/include/asm/config-pre.h| 3 ---arch/powerpc/cpu/ppc4xx/speed.c| 2 --2 files changed, 5 deletions(-)arch/blackfin/include/asm/config- renamed from arch/blackfin/include/asm/config-pre.h +0
-0
pre.h
index d0fd537..2d8b293 100644arch/blackfin/include/asm/config-pre.h +0
-3@@ -9,9 +9,6 @@#ifndef __ASM_BLACKFIN_CONFIG_PRE_H__#define __ASM_BLACKFIN_CONFIG_PRE_H__ -/* Misc helper functions */ -#define ARRAY_SIZE (x) (sizeof(x) / sizeof((x)[0])) -/* Bootmode defines -- your config needs to select this via
CONFIG_BFIN_BOOT_MODE.
* Depending on your cpu, some of these may not be valid, check your HRM.
* The actual values here are meaningless as long as they're unique.arch/powerpc/cpu/ppc4xx/speed.c +0
-0@@ -19,8 +19,6 @@ DECLARE_GLOBAL_DATA_PTR; #define
DEBUGF(fmt,args...)#endifarch/powerpc/cpu/ppc4xx/speed.c +0
-2-#define ARRAY_SIZE (x) (sizeof(x) / sizeof((x)[0])) -#if
defined(CONFIG_405GP)void
get_sys_info(PPC4xx_SYS_INFO* sysInfo)
--
1.9.1
Quoted 8 lines · Masahiro Yamada
Since
ARRAY_SIZEmacro is defined ininclude/common.h, re-defining it in arch-specific files is redundant.Signed-off-by Masahiro Yamada <[email protected]>Cc Stefan Roese <[email protected]>Cc Sonic Zhang <[email protected]>Acked-by Stefan Roese <[email protected]>Acked-by Sonic Zhang <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140707/04da2bd1/attachment.pgp>