diff options
-rw-r--r-- | arch/m68k/kernel/ptrace.c | 4 | ||||
-rw-r--r-- | arch/m68k/kernel/traps.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c index ef89060ea328..7fd2720c3841 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) | |||
76 | 76 | ||
77 | if (regno == PT_USP) | 77 | if (regno == PT_USP) |
78 | addr = &task->thread.usp; | 78 | addr = &task->thread.usp; |
79 | else if (regno < sizeof(regoff)/sizeof(regoff[0])) | 79 | else if (regno < ARRAY_SIZE(regoff)) |
80 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); | 80 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); |
81 | else | 81 | else |
82 | return 0; | 82 | return 0; |
@@ -93,7 +93,7 @@ static inline int put_reg(struct task_struct *task, int regno, | |||
93 | 93 | ||
94 | if (regno == PT_USP) | 94 | if (regno == PT_USP) |
95 | addr = &task->thread.usp; | 95 | addr = &task->thread.usp; |
96 | else if (regno < sizeof(regoff)/sizeof(regoff[0])) | 96 | else if (regno < ARRAY_SIZE(regoff)) |
97 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); | 97 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); |
98 | else | 98 | else |
99 | return -1; | 99 | return -1; |
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c index 759fa244e6cd..a27a4fa33296 100644 --- a/arch/m68k/kernel/traps.c +++ b/arch/m68k/kernel/traps.c | |||
@@ -1011,7 +1011,7 @@ EXPORT_SYMBOL(dump_stack); | |||
1011 | void bad_super_trap (struct frame *fp) | 1011 | void bad_super_trap (struct frame *fp) |
1012 | { | 1012 | { |
1013 | console_verbose(); | 1013 | console_verbose(); |
1014 | if (fp->ptregs.vector < 4*sizeof(vec_names)/sizeof(vec_names[0])) | 1014 | if (fp->ptregs.vector < 4 * ARRAY_SIZE(vec_names)) |
1015 | printk ("*** %s *** FORMAT=%X\n", | 1015 | printk ("*** %s *** FORMAT=%X\n", |
1016 | vec_names[(fp->ptregs.vector) >> 2], | 1016 | vec_names[(fp->ptregs.vector) >> 2], |
1017 | fp->ptregs.format); | 1017 | fp->ptregs.format); |