[PATCH]cleaning of the definition of HANDLE_STACK and related compilation warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is my new version of a patch that I've already posted in kernel-janitors.
This new version cleans the definition of the macro HANDLE_STACK in
arch/x86_64/kernel/traps.c and erases a related compilation warning
about while(){} not being a compound statement.

Signed-off-by: Giangiacomo Mariotti <[email protected]>
From 96027dd7916a84a57316f1a0ac272685c4def557 Mon Sep 17 00:00:00 2001
From: Giangiacomo Mariotti <[email protected]>
Date: Wed, 1 Nov 2006 12:06:31 +0100
Subject: [PATCH] cleaning of the definition of HANDLE_STACK

this patch cleans the definition of HANDLE_STACK
in the file arch/x86_64/kernel/traps.c and
it erases a compilation warning.
---
 arch/x86_64/kernel/traps.c |   35 ++++++++++++++++++++---------------
 1 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
index 7819022..0530771 100644
--- a/arch/x86_64/kernel/traps.c
+++ b/arch/x86_64/kernel/traps.c
@@ -297,22 +297,27 @@ void dump_trace(struct task_struct *tsk,
 	 * iteration will eventually trigger.
 	 */
 #define HANDLE_STACK(cond) \
-	do while (cond) { \
-		unsigned long addr = *stack++; \
-		if (oops_in_progress ? 		\
-			__kernel_text_address(addr) : \
-			kernel_text_address(addr)) { \
-			/* \
-			 * If the address is either in the text segment of the \
-			 * kernel, or in the region which contains vmalloc'ed \
-			 * memory, it *may* be the address of a calling \
-			 * routine; if so, print it so that someone tracing \
-			 * down the cause of the crash will be able to figure \
-			 * out the call path that was taken. \
-			 */ \
-			ops->address(data, addr);   \
+	do{ \
+		unsigned long addr; \
+		while(cond){ \
+			addr = *stack++; \
+			if(oops_in_progress ? 		\
+				__kernel_text_address(addr) : \
+				kernel_text_address(addr)){ \
+				/* \
+				* If the address is either in the text \
+				* segment of the kernel, or in the region \
+				* which contains vmalloc'ed memory, it may \
+				* be the address of a calling routine; if \
+				* so, print it so that someone tracing \
+				* down the cause of the crash will be able \
+				* to figure out the call path that \
+				* was taken. \
+				*/ \
+				ops->address(data, addr);   \
+			} \
 		} \
-	} while (0)
+	}while(0)
 
 	/*
 	 * Print function call entries in all stacks, starting at the
-- 
1.4.3.3


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux