Re: [SFI-devel] linux-next: sfi tree build warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 8 Jul 2009 14:44:00 +0800
Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> 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++;
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux