summaryrefslogtreecommitdiffstats
path: root/arch/m68k/kernel
diff options
context:
space:
mode:
authorAhmed S. Darwish <darwish.07@gmail.com>2007-02-10 01:43:47 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 10:51:20 -0800
commitea5e1a827abe1e9ba1c8d214b7408b6c363d764a (patch)
tree887834a664b657ff27b4a224ed2b33b11e32a4a4 /arch/m68k/kernel
parentbf0059b23fd2f0b304f647d87fad0aa626ecf0c0 (diff)
downloadop-kernel-dev-ea5e1a827abe1e9ba1c8d214b7408b6c363d764a.zip
op-kernel-dev-ea5e1a827abe1e9ba1c8d214b7408b6c363d764a.tar.gz
[PATCH] M68K: user 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: Roman Zippel <zippel@linux-m68k.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68k/kernel')
-rw-r--r--arch/m68k/kernel/ptrace.c4
-rw-r--r--arch/m68k/kernel/traps.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c
index ef89060..7fd2720 100644
--- a/arch/m68k/kernel/ptrace.c
+++ b/arch/m68k/kernel/ptrace.c
@@ -76,7 +76,7 @@ static inline long get_reg(struct task_struct *task, int regno)
if (regno == PT_USP)
addr = &task->thread.usp;
- else if (regno < sizeof(regoff)/sizeof(regoff[0]))
+ else if (regno < ARRAY_SIZE(regoff))
addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
else
return 0;
@@ -93,7 +93,7 @@ static inline int put_reg(struct task_struct *task, int regno,
if (regno == PT_USP)
addr = &task->thread.usp;
- else if (regno < sizeof(regoff)/sizeof(regoff[0]))
+ else if (regno < ARRAY_SIZE(regoff))
addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
else
return -1;
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c
index 759fa244..a27a4fa 100644
--- a/arch/m68k/kernel/traps.c
+++ b/arch/m68k/kernel/traps.c
@@ -1011,7 +1011,7 @@ EXPORT_SYMBOL(dump_stack);
void bad_super_trap (struct frame *fp)
{
console_verbose();
- if (fp->ptregs.vector < 4*sizeof(vec_names)/sizeof(vec_names[0]))
+ if (fp->ptregs.vector < 4 * ARRAY_SIZE(vec_names))
printk ("*** %s *** FORMAT=%X\n",
vec_names[(fp->ptregs.vector) >> 2],
fp->ptregs.format);
OpenPOWER on IntegriCloud