[PATCH] M68KNOMMU: user ARRAY_SIZE macro when appropriate
[sfrench/cifs-2.6.git] / arch / m68knommu / kernel / ptrace.c
index 382ca5797b97804d28e7a2fcae60d43cd0d9b3d6..72d34962357519477ea234a93e928402a759fc82 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/errno.h>
 #include <linux/ptrace.h>
 #include <linux/user.h>
-#include <linux/config.h>
 #include <linux/signal.h>
 
 #include <asm/uaccess.h>
@@ -63,7 +62,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;
@@ -80,7 +79,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;