public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.18] x86_64: silence warning when stack unwinding is disabled
@ 2006-09-21  7:12 Mikael Pettersson
  2006-09-21  7:33 ` Jan Beulich
  0 siblings, 1 reply; 4+ messages in thread
From: Mikael Pettersson @ 2006-09-21  7:12 UTC (permalink / raw)
  To: ak, jbeulich; +Cc: linux-kernel

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)
 {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2.6.18] x86_64: silence warning when stack unwinding is disabled
  2006-09-21  7:12 [PATCH 2.6.18] x86_64: silence warning when stack unwinding is disabled Mikael Pettersson
@ 2006-09-21  7:33 ` Jan Beulich
  2006-09-21  8:04   ` Andi Kleen
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2006-09-21  7:33 UTC (permalink / raw)
  To: Mikael Pettersson; +Cc: ak, linux-kernel

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)
 {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2.6.18] x86_64: silence warning when stack unwinding is disabled
  2006-09-21  7:33 ` Jan Beulich
@ 2006-09-21  8:04   ` Andi Kleen
  2006-09-21  9:15     ` Jan Beulich
  0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2006-09-21  8:04 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Mikael Pettersson, linux-kernel

On Thursday 21 September 2006 09:33, Jan Beulich wrote:
> A patch to this effect is already queued in -mm (and perhaps also in Andi's tree). Jan

I refixed it independently a few minutes ago.

There was also another compile error in my tree with unwind disabled which
I fixed.

-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2.6.18] x86_64: silence warning when stack unwinding is disabled
  2006-09-21  8:04   ` Andi Kleen
@ 2006-09-21  9:15     ` Jan Beulich
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Beulich @ 2006-09-21  9:15 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Mikael Pettersson, linux-kernel

>>> Andi Kleen <ak@suse.de> 21.09.06 10:04 >>>
>On Thursday 21 September 2006 09:33, Jan Beulich wrote:
>> A patch to this effect is already queued in -mm (and perhaps also in Andi's tree). Jan
>
>I refixed it independently a few minutes ago.
>
>There was also another compile error in my tree with unwind disabled which
>I fixed.

Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-09-21  9:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-21  7:12 [PATCH 2.6.18] x86_64: silence warning when stack unwinding is disabled Mikael Pettersson
2006-09-21  7:33 ` Jan Beulich
2006-09-21  8:04   ` Andi Kleen
2006-09-21  9:15     ` Jan Beulich

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