From 2366fb16abcd8dea96820d3cb4f1de3a868d268c Mon Sep 17 00:00:00 2001 From: "Ahmed S. Darwish" Date: Mon, 5 Feb 2007 16:14:10 -0800 Subject: [POWERPC] PPC: Use ARRAY_SIZE macro when appropriate Use ARRAY_SIZE macro already defined in linux/kernel.h Signed-off-by: Ahmed S. Darwish Cc: Benjamin Herrenschmidt Acked-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Paul Mackerras --- arch/ppc/xmon/ppc-opc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'arch/ppc/xmon') diff --git a/arch/ppc/xmon/ppc-opc.c b/arch/ppc/xmon/ppc-opc.c index 533a6c9973d4..034313cef6e7 100644 --- a/arch/ppc/xmon/ppc-opc.c +++ b/arch/ppc/xmon/ppc-opc.c @@ -19,6 +19,7 @@ along with this file; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include +#include #include "ansidecl.h" #include "ppc.h" @@ -2669,8 +2670,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. */ @@ -2717,5 +2717,4 @@ const struct powerpc_macro powerpc_macros[] = { }; -const int powerpc_num_macros = - sizeof (powerpc_macros) / sizeof (powerpc_macros[0]); +const int powerpc_num_macros = ARRAY_SIZE(powerpc_macros); -- cgit v1.2.3-59-g8ed1b