public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: "Mikael Pettersson" <mikpe@it.uu.se>
Cc: <ak@suse.de>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2.6.18] x86_64: silence warning when stack unwinding is disabled
Date: Thu, 21 Sep 2006 09:33:00 +0200	[thread overview]
Message-ID: <45125C4C.76E4.0078.0@novell.com> (raw)
In-Reply-To: <200609210712.k8L7CdrR015591@alkaid.it.uu.se>

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

  reply	other threads:[~2006-09-21  7:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2006-09-21  8:04   ` Andi Kleen
2006-09-21  9:15     ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45125C4C.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@it.uu.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox