From 362fcc4247721117f247005b9abc4426fce83403 Mon Sep 17 00:00:00 2001 From: "Ahmed S. Darwish" Date: Mon, 5 Feb 2007 16:14:09 -0800 Subject: [PATCH] --- yaml --- r: 46892 b: refs/heads/master c: 3839a5943977674d224cca541fd0914b942aa466 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/lib/rheap.c | 3 ++- trunk/arch/powerpc/xmon/ppc-opc.c | 7 +++---- trunk/arch/powerpc/xmon/spu-opc.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 4e6de565822f..b952f35c14c2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0524aad7b89671bc788d483b2c048ac7b79eefb9 +refs/heads/master: 3839a5943977674d224cca541fd0914b942aa466 diff --git a/trunk/arch/powerpc/lib/rheap.c b/trunk/arch/powerpc/lib/rheap.c index 4bbda6b2be45..6c5c5dd183ee 100644 --- a/trunk/arch/powerpc/lib/rheap.c +++ b/trunk/arch/powerpc/lib/rheap.c @@ -14,6 +14,7 @@ */ #include #include +#include #include #include @@ -671,7 +672,7 @@ void rh_dump(rh_info_t * info) int maxnr; int i, nr; - maxnr = sizeof(st) / sizeof(st[0]); + maxnr = ARRAY_SIZE(st); printk(KERN_INFO "info @0x%p (%d slots empty / %d max)\n", diff --git a/trunk/arch/powerpc/xmon/ppc-opc.c b/trunk/arch/powerpc/xmon/ppc-opc.c index 5d841f4b3530..af3780e52e76 100644 --- a/trunk/arch/powerpc/xmon/ppc-opc.c +++ b/trunk/arch/powerpc/xmon/ppc-opc.c @@ -21,6 +21,7 @@ 02110-1301, USA. */ #include +#include #include "nonstdio.h" #include "ppc.h" @@ -4932,8 +4933,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { }; -const int powerpc_num_opcodes = - sizeof (powerpc_opcodes) / sizeof (powerpc_opcodes[0]); +const int powerpc_num_opcodes = ARRAY_SIZE(powerpc_opcodes); /* The macro table. This is only used by the assembler. */ @@ -4989,5 +4989,4 @@ const struct powerpc_macro powerpc_macros[] = { { "clrlslwi.",4, PPCCOM, "rlwinm. %0,%1,%3,(%2)-(%3),31-(%3)" }, }; -const int powerpc_num_macros = - sizeof (powerpc_macros) / sizeof (powerpc_macros[0]); +const int powerpc_num_macros = ARRAY_SIZE(powerpc_macros); diff --git a/trunk/arch/powerpc/xmon/spu-opc.c b/trunk/arch/powerpc/xmon/spu-opc.c index efffde9edc6e..530df3d6d7b2 100644 --- a/trunk/arch/powerpc/xmon/spu-opc.c +++ b/trunk/arch/powerpc/xmon/spu-opc.c @@ -18,6 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#include #include "spu.h" /* This file holds the Spu opcode table */ @@ -40,5 +41,4 @@ const struct spu_opcode spu_opcodes[] = { #undef APUOPFB }; -const int spu_num_opcodes = - sizeof (spu_opcodes) / sizeof (spu_opcodes[0]); +const int spu_num_opcodes = ARRAY_SIZE(spu_opcodes);