microblaze: Fix variable types to remove W=1 warning
authorMichal Simek <michal.simek@xilinx.com>
Thu, 18 Dec 2014 14:38:07 +0000 (15:38 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 8 Jan 2015 07:37:21 +0000 (08:37 +0100)
This patch removes this warning:
arch/microblaze/kernel/signal.c: In function 'setup_rt_frame':
arch/microblaze/kernel/signal.c:177:3: warning: signed and unsigned type
in conditional expression [-Wsign-compare]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/microblaze/kernel/signal.c

index 8955a38..2357060 100644 (file)
@@ -158,7 +158,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
 {
        struct rt_sigframe __user *frame;
        int err = 0, sig = ksig->sig;
-       int signal;
+       unsigned long signal;
        unsigned long address = 0;
 #ifdef CONFIG_MMU
        pmd_t *pmdp;
@@ -174,7 +174,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
                && current_thread_info()->exec_domain->signal_invmap
                && sig < 32
                ? current_thread_info()->exec_domain->signal_invmap[sig]
-               : sig;
+               : (unsigned long)sig;
 
        if (ksig->ka.sa.sa_flags & SA_SIGINFO)
                err |= copy_siginfo_to_user(&frame->info, &ksig->info);