Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37d2cd9d authored by Martin Schwidefsky's avatar Martin Schwidefsky
Browse files

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] <asn:1>*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] <asn:1>*svc
arch/s390/kernel/compat_signal.c:437:65:    got void *

Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent a697e051
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -434,7 +434,7 @@ static int setup_frame32(struct ksignal *ksig, sigset_t *set,
			ksig->ka.sa.sa_restorer | PSW32_ADDR_AMODE;
			ksig->ka.sa.sa_restorer | PSW32_ADDR_AMODE;
	} else {
	} else {
		/* Signal frames without vectors registers are short ! */
		/* 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))
		if (__put_user(S390_SYSCALL_OPCODE | __NR_sigreturn, svc))
			return -EFAULT;
			return -EFAULT;
		restorer = (unsigned long __force) svc | PSW32_ADDR_AMODE;
		restorer = (unsigned long __force) svc | PSW32_ADDR_AMODE;
+1 −1
Original line number Original line Diff line number Diff line
@@ -371,7 +371,7 @@ static int setup_frame(int sig, struct k_sigaction *ka,
		restorer = (unsigned long) ka->sa.sa_restorer | PSW_ADDR_AMODE;
		restorer = (unsigned long) ka->sa.sa_restorer | PSW_ADDR_AMODE;
	} else {
	} else {
		/* Signal frame without vector registers are short ! */
		/* 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))
		if (__put_user(S390_SYSCALL_OPCODE | __NR_sigreturn, svc))
			return -EFAULT;
			return -EFAULT;
		restorer = (unsigned long) svc | PSW_ADDR_AMODE;
		restorer = (unsigned long) svc | PSW_ADDR_AMODE;