s390/compat signal: add couple of __force annotations
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 6 Sep 2013 16:52:31 +0000 (18:52 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Sat, 7 Sep 2013 09:57:59 +0000 (11:57 +0200)
Add __force annotations to get rid of a couple of sparse warnings:

arch/s390/kernel/compat_signal.c:335:35:
 warning: cast removes address space of expression

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
arch/s390/kernel/compat_signal.c

index c439ac9ced092a6a8c4ea710b3127c4bb6cb3014..1389b637dae55018e3eab8b18dd3f44e9440e078 100644 (file)
@@ -332,9 +332,9 @@ static int setup_frame32(int sig, struct k_sigaction *ka,
        /* Set up to return from userspace.  If provided, use a stub
           already in userspace.  */
        if (ka->sa.sa_flags & SA_RESTORER) {
-               regs->gprs[14] = (__u64) ka->sa.sa_restorer | PSW32_ADDR_AMODE;
+               regs->gprs[14] = (__u64 __force) ka->sa.sa_restorer | PSW32_ADDR_AMODE;
        } else {
-               regs->gprs[14] = (__u64) frame->retcode | PSW32_ADDR_AMODE;
+               regs->gprs[14] = (__u64 __force) frame->retcode | PSW32_ADDR_AMODE;
                if (__put_user(S390_SYSCALL_OPCODE | __NR_sigreturn,
                               (u16 __force __user *)(frame->retcode)))
                        goto give_sigsegv;
@@ -400,9 +400,9 @@ static int setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info,
        /* Set up to return from userspace.  If provided, use a stub
           already in userspace.  */
        if (ka->sa.sa_flags & SA_RESTORER) {
-               regs->gprs[14] = (__u64) ka->sa.sa_restorer | PSW32_ADDR_AMODE;
+               regs->gprs[14] = (__u64 __force) ka->sa.sa_restorer | PSW32_ADDR_AMODE;
        } else {
-               regs->gprs[14] = (__u64) frame->retcode | PSW32_ADDR_AMODE;
+               regs->gprs[14] = (__u64 __force) frame->retcode | PSW32_ADDR_AMODE;
                err |= __put_user(S390_SYSCALL_OPCODE | __NR_rt_sigreturn,
                                  (u16 __force __user *)(frame->retcode));
        }
@@ -417,7 +417,7 @@ static int setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info,
        regs->psw.mask = PSW_MASK_BA |
                (psw_user_bits & PSW_MASK_ASC) |
                (regs->psw.mask & ~PSW_MASK_ASC);
-       regs->psw.addr = (__u64) ka->sa.sa_handler;
+       regs->psw.addr = (__u64 __force) ka->sa.sa_handler;
 
        regs->gprs[2] = map_signal(sig);
        regs->gprs[3] = (__force __u64) &frame->info;