Commit 547e3cec authored by Martin Schwidefsky's avatar Martin Schwidefsky

[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: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 32272a26
...@@ -204,7 +204,6 @@ static unsigned long __peek_user(struct task_struct *child, addr_t addr) ...@@ -204,7 +204,6 @@ static unsigned long __peek_user(struct task_struct *child, addr_t addr)
static int static int
peek_user(struct task_struct *child, addr_t addr, addr_t data) peek_user(struct task_struct *child, addr_t addr, addr_t data)
{ {
struct user *dummy = NULL;
addr_t tmp, mask; addr_t tmp, mask;
/* /*
...@@ -213,8 +212,8 @@ peek_user(struct task_struct *child, addr_t addr, addr_t data) ...@@ -213,8 +212,8 @@ peek_user(struct task_struct *child, addr_t addr, addr_t data)
*/ */
mask = __ADDR_MASK; mask = __ADDR_MASK;
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT
if (addr >= (addr_t) &dummy->regs.acrs && if (addr >= (addr_t) &((struct user *) NULL)->regs.acrs &&
addr < (addr_t) &dummy->regs.orig_gpr2) addr < (addr_t) &((struct user *) NULL)->regs.orig_gpr2)
mask = 3; mask = 3;
#endif #endif
if ((addr & mask) || addr > sizeof(struct user) - __ADDR_MASK) 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,7 +311,6 @@ static int __poke_user(struct task_struct *child, addr_t addr, addr_t data)
static int static int
poke_user(struct task_struct *child, addr_t addr, addr_t data) poke_user(struct task_struct *child, addr_t addr, addr_t data)
{ {
struct user *dummy = NULL;
addr_t mask; addr_t mask;
/* /*
...@@ -321,8 +319,8 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data) ...@@ -321,8 +319,8 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data)
*/ */
mask = __ADDR_MASK; mask = __ADDR_MASK;
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT
if (addr >= (addr_t) &dummy->regs.acrs && if (addr >= (addr_t) &((struct user *) NULL)->regs.acrs &&
addr < (addr_t) &dummy->regs.orig_gpr2) addr < (addr_t) &((struct user *) NULL)->regs.orig_gpr2)
mask = 3; mask = 3;
#endif #endif
if ((addr & mask) || addr > sizeof(struct user) - __ADDR_MASK) if ((addr & mask) || addr > sizeof(struct user) - __ADDR_MASK)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment