diff options
author | Ahmed S. Darwish <darwish.07@gmail.com> | 2007-02-05 19:14:09 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-02-08 00:08:18 -0500 |
commit | 3839a5943977674d224cca541fd0914b942aa466 (patch) | |
tree | e680a69c5052e8746539ebc2e3561f62f92f0b50 /arch/powerpc/xmon/ppc-opc.c | |
parent | 0524aad7b89671bc788d483b2c048ac7b79eefb9 (diff) |
[POWERPC] Use ARRAY_SIZE macro when appropriate
Use ARRAY_SIZE macro already defined in linux/kernel.h
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/xmon/ppc-opc.c')
-rw-r--r-- | arch/powerpc/xmon/ppc-opc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/powerpc/xmon/ppc-opc.c b/arch/powerpc/xmon/ppc-opc.c index 5d841f4b3530..af3780e52e76 100644 --- a/arch/powerpc/xmon/ppc-opc.c +++ b/arch/powerpc/xmon/ppc-opc.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 02110-1301, USA. */ | 21 | 02110-1301, USA. */ |
22 | 22 | ||
23 | #include <linux/stddef.h> | 23 | #include <linux/stddef.h> |
24 | #include <linux/kernel.h> | ||
24 | #include "nonstdio.h" | 25 | #include "nonstdio.h" |
25 | #include "ppc.h" | 26 | #include "ppc.h" |
26 | 27 | ||
@@ -4932,8 +4933,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { | |||
4932 | 4933 | ||
4933 | }; | 4934 | }; |
4934 | 4935 | ||
4935 | const int powerpc_num_opcodes = | 4936 | const int powerpc_num_opcodes = ARRAY_SIZE(powerpc_opcodes); |
4936 | sizeof (powerpc_opcodes) / sizeof (powerpc_opcodes[0]); | ||
4937 | 4937 | ||
4938 | /* The macro table. This is only used by the assembler. */ | 4938 | /* The macro table. This is only used by the assembler. */ |
4939 | 4939 | ||
@@ -4989,5 +4989,4 @@ const struct powerpc_macro powerpc_macros[] = { | |||
4989 | { "clrlslwi.",4, PPCCOM, "rlwinm. %0,%1,%3,(%2)-(%3),31-(%3)" }, | 4989 | { "clrlslwi.",4, PPCCOM, "rlwinm. %0,%1,%3,(%2)-(%3),31-(%3)" }, |
4990 | }; | 4990 | }; |
4991 | 4991 | ||
4992 | const int powerpc_num_macros = | 4992 | const int powerpc_num_macros = ARRAY_SIZE(powerpc_macros); |
4993 | sizeof (powerpc_macros) / sizeof (powerpc_macros[0]); | ||