CRIS: Avoid warning in cris mm/fault.c
authorJesper Nilsson <jespern@axis.com>
Thu, 15 Jan 2015 16:54:00 +0000 (17:54 +0100)
committerJesper Nilsson <jespern@axis.com>
Thu, 29 Jan 2015 09:10:08 +0000 (10:10 +0100)
Move declaration of waitqueue to beginning of block,
avoids warning about mixing declarations and code.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
arch/cris/mm/fault.c

index 1790f22..46a6ade 100644 (file)
@@ -217,6 +217,9 @@ retry:
        /* User mode accesses just cause a SIGSEGV */
 
        if (user_mode(regs)) {
+#ifdef CONFIG_NO_SEGFAULT_TERMINATION
+               DECLARE_WAIT_QUEUE_HEAD(wq);
+#endif
                printk(KERN_NOTICE "%s (pid %d) segfaults for page "
                        "address %08lx at pc %08lx\n",
                        tsk->comm, tsk->pid,
@@ -227,7 +230,6 @@ retry:
                        show_registers(regs);
 
 #ifdef CONFIG_NO_SEGFAULT_TERMINATION
-               DECLARE_WAIT_QUEUE_HEAD(wq);
                wait_event_interruptible(wq, 0 == 1);
 #else
                info.si_signo = SIGSEGV;