diff options
-rw-r--r-- | arch/m68knommu/kernel/ptrace.c | 4 | ||||
-rw-r--r-- | arch/m68knommu/kernel/traps.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c index 9130119537b9..72d349623575 100644 --- a/arch/m68knommu/kernel/ptrace.c +++ b/arch/m68knommu/kernel/ptrace.c | |||
@@ -62,7 +62,7 @@ static inline long get_reg(struct task_struct *task, int regno) | |||
62 | 62 | ||
63 | if (regno == PT_USP) | 63 | if (regno == PT_USP) |
64 | addr = &task->thread.usp; | 64 | addr = &task->thread.usp; |
65 | else if (regno < sizeof(regoff)/sizeof(regoff[0])) | 65 | else if (regno < ARRAY_SIZE(regoff)) |
66 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); | 66 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); |
67 | else | 67 | else |
68 | return 0; | 68 | return 0; |
@@ -79,7 +79,7 @@ static inline int put_reg(struct task_struct *task, int regno, | |||
79 | 79 | ||
80 | if (regno == PT_USP) | 80 | if (regno == PT_USP) |
81 | addr = &task->thread.usp; | 81 | addr = &task->thread.usp; |
82 | else if (regno < sizeof(regoff)/sizeof(regoff[0])) | 82 | else if (regno < ARRAY_SIZE(regoff)) |
83 | addr = (unsigned long *) (task->thread.esp0 + regoff[regno]); | 83 | addr = (unsigned long *) (task->thread.esp0 + regoff[regno]); |
84 | else | 84 | else |
85 | return -1; | 85 | return -1; |
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c index 9129b3a5258b..bed5f47bf568 100644 --- a/arch/m68knommu/kernel/traps.c +++ b/arch/m68knommu/kernel/traps.c | |||
@@ -158,7 +158,7 @@ void show_stack(struct task_struct *task, unsigned long *stack) | |||
158 | void bad_super_trap(struct frame *fp) | 158 | void bad_super_trap(struct frame *fp) |
159 | { | 159 | { |
160 | console_verbose(); | 160 | console_verbose(); |
161 | if (fp->ptregs.vector < 4*sizeof(vec_names)/sizeof(vec_names[0])) | 161 | if (fp->ptregs.vector < 4 * ARRAY_SIZE(vec_names)) |
162 | printk (KERN_WARNING "*** %s *** FORMAT=%X\n", | 162 | printk (KERN_WARNING "*** %s *** FORMAT=%X\n", |
163 | vec_names[(fp->ptregs.vector) >> 2], | 163 | vec_names[(fp->ptregs.vector) >> 2], |
164 | fp->ptregs.format); | 164 | fp->ptregs.format); |