All of lore.kernel.org
 help / color / mirror / Atom feed
From: Feng Tang <feng.tang@intel.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: "sfi-devel@simplefirmware.org" <sfi-devel@simplefirmware.org>,
	"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [SFI-devel] linux-next: sfi tree build warning
Date: Wed, 8 Jul 2009 14:57:40 +0800	[thread overview]
Message-ID: <20090708145740.0e5e4b07@feng-desktop> (raw)
In-Reply-To: <20090708164400.f2138d79.sfr@canb.auug.org.au>

On Wed, 8 Jul 2009 14:44:00 +0800
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> Today's linux-next build (x86_64 allmodconfig) produced this warning:
> 
> arch/x86/kernel/sfi.c: In function 'sfi_init_memory_map':
> arch/x86/kernel/sfi.c:99: warning: cast to pointer from integer of
> different size arch/x86/kernel/sfi.c:100: warning: cast to pointer
> from integer of different size
> 
Hi Stephen,

Thanks for the finding. Could you help to test the following quick patch?
it should works for both x86_32 and x86_64. thanks

- Feng 

diff --git a/arch/x86/kernel/sfi.c b/arch/x86/kernel/sfi.c
index a96ea0f..b23e489 100644
--- a/arch/x86/kernel/sfi.c
+++ b/arch/x86/kernel/sfi.c
@@ -96,8 +96,9 @@ int __init sfi_init_memory_map(void)
	/* walk through the syst to search the mmap table */
	mmapt = NULL;
	for (i = 0; i < tbl_cnt; i++) {
-		if (!strncmp(SFI_SIG_MMAP, (char *)(u32)*pentry, 4)) {
-			mmapt = (struct sfi_table_simple *)(u32)*pentry;
+		if (!strncmp(SFI_SIG_MMAP, (char *)(unsigned long)*pentry, 4)) {
+			mmapt = (struct sfi_table_simple *)
+					(unsigned long)*pentry;
			break;
                }
		pentry++;

  reply	other threads:[~2009-07-08  6:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-08  6:44 linux-next: sfi tree build warning Stephen Rothwell
2009-07-08  6:44 ` Stephen Rothwell
2009-07-08  6:57 ` Feng Tang [this message]
2009-07-08  7:40   ` [SFI-devel] " Stephen Rothwell
2009-07-08 15:26 ` Len Brown
2009-07-08 23:45   ` Stephen Rothwell

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=20090708145740.0e5e4b07@feng-desktop \
    --to=feng.tang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfi-devel@simplefirmware.org \
    --cc=sfr@canb.auug.org.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.