aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/lib/rheap.c3
-rw-r--r--arch/powerpc/xmon/ppc-opc.c7
-rw-r--r--arch/powerpc/xmon/spu-opc.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c
index 4bbda6b2be45..6c5c5dd183ee 100644
--- a/arch/powerpc/lib/rheap.c
+++ b/arch/powerpc/lib/rheap.c
@@ -14,6 +14,7 @@
14 */ 14 */
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/kernel.h>
17#include <linux/mm.h> 18#include <linux/mm.h>
18#include <linux/slab.h> 19#include <linux/slab.h>
19 20
@@ -671,7 +672,7 @@ void rh_dump(rh_info_t * info)
671 int maxnr; 672 int maxnr;
672 int i, nr; 673 int i, nr;
673 674
674 maxnr = sizeof(st) / sizeof(st[0]); 675 maxnr = ARRAY_SIZE(st);
675 676
676 printk(KERN_INFO 677 printk(KERN_INFO
677 "info @0x%p (%d slots empty / %d max)\n", 678 "info @0x%p (%d slots empty / %d max)\n",
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
4935const int powerpc_num_opcodes = 4936const 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
4992const int powerpc_num_macros = 4992const int powerpc_num_macros = ARRAY_SIZE(powerpc_macros);
4993 sizeof (powerpc_macros) / sizeof (powerpc_macros[0]);
diff --git a/arch/powerpc/xmon/spu-opc.c b/arch/powerpc/xmon/spu-opc.c
index efffde9edc6e..530df3d6d7b2 100644
--- a/arch/powerpc/xmon/spu-opc.c
+++ b/arch/powerpc/xmon/spu-opc.c
@@ -18,6 +18,7 @@
18 with this program; if not, write to the Free Software Foundation, Inc., 18 with this program; if not, write to the Free Software Foundation, Inc.,
19 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 19 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
20 20
21#include <linux/kernel.h>
21#include "spu.h" 22#include "spu.h"
22 23
23/* This file holds the Spu opcode table */ 24/* This file holds the Spu opcode table */
@@ -40,5 +41,4 @@ const struct spu_opcode spu_opcodes[] = {
40#undef APUOPFB 41#undef APUOPFB
41}; 42};
42 43
43const int spu_num_opcodes = 44const int spu_num_opcodes = ARRAY_SIZE(spu_opcodes);
44 sizeof (spu_opcodes) / sizeof (spu_opcodes[0]);