diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-12-25 07:39:00 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-12-25 07:39:05 -0500 |
commit | 547e3cec4f7a4846707db19cba43aa58eb07f48f (patch) | |
tree | f131b2b276dde4f2e4ff0899ad450ae95068c6d0 | |
parent | 32272a26974d2027384fd4010cd1780fca425d94 (diff) |
[S390] remove ptrace warning on 31 bit.
A kernel compile on 31 bit gives the following warnings in ptrace.c:
arch/s390/kernel/ptrace.c: In function 'peek_user':
arch/s390/kernel/ptrace.c:207: warning: unused variable 'dummy'
arch/s390/kernel/ptrace.c: In function 'poke_user':
arch/s390/kernel/ptrace.c:315: warning: unused variable 'dummy'
Getting rid of the dummy variables removes the warnings.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | arch/s390/kernel/ptrace.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 38ff2bce1203..75c496f4f16d 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -204,7 +204,6 @@ static unsigned long __peek_user(struct task_struct *child, addr_t addr) | |||
204 | static int | 204 | static int |
205 | peek_user(struct task_struct *child, addr_t addr, addr_t data) | 205 | peek_user(struct task_struct *child, addr_t addr, addr_t data) |
206 | { | 206 | { |
207 | struct user *dummy = NULL; | ||
208 | addr_t tmp, mask; | 207 | addr_t tmp, mask; |
209 | 208 | ||
210 | /* | 209 | /* |
@@ -213,8 +212,8 @@ peek_user(struct task_struct *child, addr_t addr, addr_t data) | |||
213 | */ | 212 | */ |
214 | mask = __ADDR_MASK; | 213 | mask = __ADDR_MASK; |
215 | #ifdef CONFIG_64BIT | 214 | #ifdef CONFIG_64BIT |
216 | if (addr >= (addr_t) &dummy->regs.acrs && | 215 | if (addr >= (addr_t) &((struct user *) NULL)->regs.acrs && |
217 | addr < (addr_t) &dummy->regs.orig_gpr2) | 216 | addr < (addr_t) &((struct user *) NULL)->regs.orig_gpr2) |
218 | mask = 3; | 217 | mask = 3; |
219 | #endif | 218 | #endif |
220 | if ((addr & mask) || addr > sizeof(struct user) - __ADDR_MASK) | 219 | if ((addr & mask) || addr > sizeof(struct user) - __ADDR_MASK) |
@@ -312,7 +311,6 @@ static int __poke_user(struct task_struct *child, addr_t addr, addr_t data) | |||
312 | static int | 311 | static int |
313 | poke_user(struct task_struct *child, addr_t addr, addr_t data) | 312 | poke_user(struct task_struct *child, addr_t addr, addr_t data) |
314 | { | 313 | { |
315 | struct user *dummy = NULL; | ||
316 | addr_t mask; | 314 | addr_t mask; |
317 | 315 | ||
318 | /* | 316 | /* |
@@ -321,8 +319,8 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data) | |||
321 | */ | 319 | */ |
322 | mask = __ADDR_MASK; | 320 | mask = __ADDR_MASK; |
323 | #ifdef CONFIG_64BIT | 321 | #ifdef CONFIG_64BIT |
324 | if (addr >= (addr_t) &dummy->regs.acrs && | 322 | if (addr >= (addr_t) &((struct user *) NULL)->regs.acrs && |
325 | addr < (addr_t) &dummy->regs.orig_gpr2) | 323 | addr < (addr_t) &((struct user *) NULL)->regs.orig_gpr2) |
326 | mask = 3; | 324 | mask = 3; |
327 | #endif | 325 | #endif |
328 | if ((addr & mask) || addr > sizeof(struct user) - __ADDR_MASK) | 326 | if ((addr & mask) || addr > sizeof(struct user) - __ADDR_MASK) |