lkml.org 
[lkml]   [2006]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 2.6.18] x86_64: silence warning when stack unwinding is disabled
A patch to this effect is already queued in -mm (and perhaps also in Andi's tree). Jan

>>> Mikael Pettersson <mikpe@it.uu.se> 21.09.06 09:12 >>>
Compiling kernel 2.6.18 on x86_64 with CONFIG_STACK_UNWIND=n gives:

arch/x86_64/kernel/traps.c: In function 'show_trace':
arch/x86_64/kernel/traps.c:287: warning: cast to pointer from integer of different size

This is because UNW_SP() evaluates to 0, of type int, which
is cast to a pointer by traps.c. Fix: evaluate to 0UL instead.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>

--- linux-2.6.18/include/asm-x86_64/unwind.h.~1~ 2006-09-20 19:28:57.000000000 +0200
+++ linux-2.6.18/include/asm-x86_64/unwind.h 2006-09-20 20:17:52.000000000 +0200
@@ -95,7 +95,7 @@ static inline int arch_unw_user_mode(con
#else

#define UNW_PC(frame) ((void)(frame), 0)
-#define UNW_SP(frame) ((void)(frame), 0)
+#define UNW_SP(frame) ((void)(frame), 0UL)

static inline int arch_unw_user_mode(const void *info)
{
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-09-21 09:35    [W:0.112 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site