um: Fix warning in setup_signal_stack_si()
authorRichard Weinberger <richard@nod.at>
Wed, 13 May 2015 21:02:14 +0000 (23:02 +0200)
committerRichard Weinberger <richard@nod.at>
Sun, 31 May 2015 15:39:19 +0000 (17:39 +0200)
Fixes:
arch/x86/um/signal.c: In function ‘setup_signal_stack_si’:
include/asm-generic/uaccess.h:146:27: warning: initialization from incompatible pointer type [enabled by default]
  __typeof__(*(ptr)) __x = (x);    \
                           ^
arch/x86/um/signal.c:544:10: note: in expansion of macro ‘__put_user’
   err |= __put_user(ksig->ka.sa.sa_restorer,

Signed-off-by: Richard Weinberger <richard@nod.at>
arch/x86/um/signal.c

index 592491d1d70d9b2ceb95600707c6ba7daa693049..06934a8a48724dc5fc6600b49178e9573e7558c5 100644 (file)
@@ -541,7 +541,8 @@ int setup_signal_stack_si(unsigned long stack_top, struct ksignal *ksig,
         */
        /* x86-64 should always use SA_RESTORER. */
        if (ksig->ka.sa.sa_flags & SA_RESTORER)
-               err |= __put_user(ksig->ka.sa.sa_restorer, &frame->pretcode);
+               err |= __put_user((void *)ksig->ka.sa.sa_restorer,
+                                 &frame->pretcode);
        else
                /* could use a vstub here */
                return err;