mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arch: cris: mm: add a code block for variable declaration
@ 2013-06-27  6:43 Chen Gang
  0 siblings, 0 replies; only message in thread
From: Chen Gang @ 2013-06-27  6:43 UTC (permalink / raw)
  To: starvik, Jesper Nilsson
  Cc: Andrew Morton, shaohua.li, linux-cris-kernel, linux-kernel, Linux-Arch

Need a code block for variable declaration, or can not pass compiling
by old C compiler.

The new C compiler will report the warning (with allmodconfig):

  arch/cris/mm/fault.c: In function ‘do_page_fault’:
  arch/cris/mm/fault.c:228:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/cris/mm/fault.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c
index 73312ab..919ab17c 100644
--- a/arch/cris/mm/fault.c
+++ b/arch/cris/mm/fault.c
@@ -225,8 +225,10 @@ retry:
 			show_registers(regs);
 
 #ifdef CONFIG_NO_SEGFAULT_TERMINATION
-		DECLARE_WAIT_QUEUE_HEAD(wq);
-		wait_event_interruptible(wq, 0 == 1);
+		{
+			DECLARE_WAIT_QUEUE_HEAD(wq);
+			wait_event_interruptible(wq, 0 == 1);
+		}
 #else
 		info.si_signo = SIGSEGV;
 		info.si_errno = 0;
-- 
1.7.7.6

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-27  6:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-27  6:43 [PATCH] arch: cris: mm: add a code block for variable declaration Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome