From: Jesper Nilsson Date: Thu, 15 Jan 2015 16:54:00 +0000 (+0100) Subject: CRIS: Avoid warning in cris mm/fault.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=134115cd609d53c25fef99dba75857961a63d8a7;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git CRIS: Avoid warning in cris mm/fault.c Move declaration of waitqueue to beginning of block, avoids warning about mixing declarations and code. Signed-off-by: Jesper Nilsson --- diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c index 1790f22e71a2..46a6ade5d0e4 100644 --- a/arch/cris/mm/fault.c +++ b/arch/cris/mm/fault.c @@ -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;