aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/kernel/ptrace.c
diff options
context:
space:
mode:
authorAhmed S. Darwish <darwish.07@gmail.com>2007-02-10 04:43:47 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:20 -0500
commitea5e1a827abe1e9ba1c8d214b7408b6c363d764a (patch)
tree887834a664b657ff27b4a224ed2b33b11e32a4a4 /arch/m68k/kernel/ptrace.c
parentbf0059b23fd2f0b304f647d87fad0aa626ecf0c0 (diff)
[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/ptrace.c')
-rw-r--r--arch/m68k/kernel/ptrace.c4
1 files changed, 2 insertions, 2 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;