From 96027dd7916a84a57316f1a0ac272685c4def557 Mon Sep 17 00:00:00 2001 From: Giangiacomo Mariotti 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