From: Martin Schwidefsky Date: Thu, 30 Oct 2014 12:45:43 +0000 (+0100) Subject: s390/signal: add sparse annotations X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=37d2cd9d84851a2bd4a4bcc0157880ee4d8b5803;p=linux-beck.git s390/signal: add sparse annotations Fix the following warnings from the sparse code checker: arch/s390/kernel/signal.c:374:38: warning: cast removes address space of expression arch/s390/kernel/signal.c:374:65: warning: incorrect type in initializer (different address spaces) arch/s390/kernel/signal.c:374:65: expected unsigned short [noderef] [usertype] *svc arch/s390/kernel/signal.c:374:65: got void * arch/s390/kernel/compat_signal.c:437:38: warning: cast removes address space of expression arch/s390/kernel/compat_signal.c:437:65: warning: incorrect type in initializer (different address spaces) arch/s390/kernel/compat_signal.c:437:65: expected unsigned short [noderef] [usertype] *svc arch/s390/kernel/compat_signal.c:437:65: got void * Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index 009f5eb11125..34d5fa7b01b5 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c @@ -434,7 +434,7 @@ static int setup_frame32(struct ksignal *ksig, sigset_t *set, ksig->ka.sa.sa_restorer | PSW32_ADDR_AMODE; } else { /* Signal frames without vectors registers are short ! */ - __u16 __user *svc = (void *) frame + frame_size - 2; + __u16 __user *svc = (void __user *) frame + frame_size - 2; if (__put_user(S390_SYSCALL_OPCODE | __NR_sigreturn, svc)) return -EFAULT; restorer = (unsigned long __force) svc | PSW32_ADDR_AMODE; diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 0c1a0ff0a558..6a2ac257d98f 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c @@ -371,7 +371,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, restorer = (unsigned long) ka->sa.sa_restorer | PSW_ADDR_AMODE; } else { /* Signal frame without vector registers are short ! */ - __u16 __user *svc = (void *) frame + frame_size - 2; + __u16 __user *svc = (void __user *) frame + frame_size - 2; if (__put_user(S390_SYSCALL_OPCODE | __NR_sigreturn, svc)) return -EFAULT; restorer = (unsigned long) svc | PSW_ADDR_AMODE;