aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/ppc/lib/rheap.c3
-rw-r--r--arch/ppc/syslib/m8xx_setup.c2
-rw-r--r--arch/ppc/xmon/ppc-opc.c7
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/ppc/lib/rheap.c b/arch/ppc/lib/rheap.c
index 31e511856dc5..d40700795a9c 100644
--- a/arch/ppc/lib/rheap.c
+++ b/arch/ppc/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
@@ -654,7 +655,7 @@ void rh_dump(rh_info_t * info)
654 int maxnr; 655 int maxnr;
655 int i, nr; 656 int i, nr;
656 657
657 maxnr = sizeof(st) / sizeof(st[0]); 658 maxnr = ARRAY_SIZE(st);
658 659
659 printk(KERN_INFO 660 printk(KERN_INFO
660 "info @0x%p (%d slots empty / %d max)\n", 661 "info @0x%p (%d slots empty / %d max)\n",
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
index d8d299bd1a12..01e48d88f22d 100644
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -77,7 +77,7 @@ static struct mtd_partition mpc8xxads_partitions[] = {
77 } 77 }
78}; 78};
79 79
80#define mpc8xxads_part_num (sizeof (mpc8xxads_partitions) / sizeof (mpc8xxads_partitions[0])) 80#define mpc8xxads_part_num ARRAY_SIZE(mpc8xxads_partitions)
81 81
82#endif 82#endif
83 83
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
19Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 19Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20 20
21#include <linux/posix_types.h> 21#include <linux/posix_types.h>
22#include <linux/kernel.h>
22#include "ansidecl.h" 23#include "ansidecl.h"
23#include "ppc.h" 24#include "ppc.h"
24 25
@@ -2669,8 +2670,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
2669 2670
2670}; 2671};
2671 2672
2672const int powerpc_num_opcodes = 2673const int powerpc_num_opcodes = ARRAY_SIZE(powerpc_opcodes);
2673 sizeof (powerpc_opcodes) / sizeof (powerpc_opcodes[0]);
2674 2674
2675/* The macro table. This is only used by the assembler. */ 2675/* The macro table. This is only used by the assembler. */
2676 2676
@@ -2717,5 +2717,4 @@ const struct powerpc_macro powerpc_macros[] = {
2717 2717
2718}; 2718};
2719 2719
2720const int powerpc_num_macros = 2720const int powerpc_num_macros = ARRAY_SIZE(powerpc_macros);
2721 sizeof (powerpc_macros) / sizeof (powerpc_macros[0]);