* [PATCH] x86: Fix warning about cast from pointer to integer of different size
@ 2012-11-19 17:10 Alexander Duyck
2012-11-19 18:31 ` [RESEND][PATCH] " Alexander Duyck
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Duyck @ 2012-11-19 17:10 UTC (permalink / raw)
To: tglx, mingo, andi, hpa; +Cc: x86, linux-kernel
This patch fixes a warning reported by the kbuild test robot where we were
casting a pointer to a physical address which represents an integer of a
different size. Per the suggestion of Peter Anvin I am replacing it and one
other spot where I made a similar cast with an unsigned long.
Cc: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
arch/x86/kernel/head32.c | 2 +-
arch/x86/kernel/head64.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
index f15db0c..e175548 100644
--- a/arch/x86/kernel/head32.c
+++ b/arch/x86/kernel/head32.c
@@ -31,7 +31,7 @@ static void __init i386_default_early_setup(void)
void __init i386_start_kernel(void)
{
memblock_reserve(__pa_symbol(_text),
- (phys_addr_t)__bss_stop - (phys_addr_t)_text);
+ (unsigned long)__bss_stop - (unsigned long)_text);
#ifdef CONFIG_BLK_DEV_INITRD
/* Reserve INITRD */
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 42f5df1..7b215a5 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -98,7 +98,7 @@ void __init x86_64_start_reservations(char *real_mode_data)
copy_bootdata(__va(real_mode_data));
memblock_reserve(__pa_symbol(_text),
- (phys_addr_t)__bss_stop - (phys_addr_t)_text);
+ (unsigned long)__bss_stop - (unsigned long)_text);
#ifdef CONFIG_BLK_DEV_INITRD
/* Reserve INITRD */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [RESEND][PATCH] x86: Fix warning about cast from pointer to integer of different size
2012-11-19 17:10 [PATCH] x86: Fix warning about cast from pointer to integer of different size Alexander Duyck
@ 2012-11-19 18:31 ` Alexander Duyck
2012-11-19 20:01 ` [tip:x86/mm] " tip-bot for Alexander Duyck
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Duyck @ 2012-11-19 18:31 UTC (permalink / raw)
To: tglx, mingo, andi, hpa; +Cc: H. Peter Anvin, x86, linux-kernel
This patch fixes a warning reported by the kbuild test robot where we were
casting a pointer to a physical address which represents an integer of a
different size. Per the suggestion of Peter Anvin I am replacing it and one
other spot where I made a similar cast with an unsigned long.
Cc: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
Resending patch as I realized I forgot to add --auto to stgit command line and
as such the Cc was ignored. Sorry for the extra noise on the list.
arch/x86/kernel/head32.c | 2 +-
arch/x86/kernel/head64.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
index f15db0c..e175548 100644
--- a/arch/x86/kernel/head32.c
+++ b/arch/x86/kernel/head32.c
@@ -31,7 +31,7 @@ static void __init i386_default_early_setup(void)
void __init i386_start_kernel(void)
{
memblock_reserve(__pa_symbol(_text),
- (phys_addr_t)__bss_stop - (phys_addr_t)_text);
+ (unsigned long)__bss_stop - (unsigned long)_text);
#ifdef CONFIG_BLK_DEV_INITRD
/* Reserve INITRD */
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 42f5df1..7b215a5 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -98,7 +98,7 @@ void __init x86_64_start_reservations(char *real_mode_data)
copy_bootdata(__va(real_mode_data));
memblock_reserve(__pa_symbol(_text),
- (phys_addr_t)__bss_stop - (phys_addr_t)_text);
+ (unsigned long)__bss_stop - (unsigned long)_text);
#ifdef CONFIG_BLK_DEV_INITRD
/* Reserve INITRD */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [tip:x86/mm] x86: Fix warning about cast from pointer to integer of different size
2012-11-19 18:31 ` [RESEND][PATCH] " Alexander Duyck
@ 2012-11-19 20:01 ` tip-bot for Alexander Duyck
0 siblings, 0 replies; 3+ messages in thread
From: tip-bot for Alexander Duyck @ 2012-11-19 20:01 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, alexander.h.duyck, tglx, hpa
Commit-ID: bbee3aec3472fc2ca10b6b1020aec84567ea25ce
Gitweb: http://git.kernel.org/tip/bbee3aec3472fc2ca10b6b1020aec84567ea25ce
Author: Alexander Duyck <alexander.h.duyck@intel.com>
AuthorDate: Mon, 19 Nov 2012 10:31:37 -0800
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Mon, 19 Nov 2012 10:45:19 -0800
x86: Fix warning about cast from pointer to integer of different size
This patch fixes a warning reported by the kbuild test robot where we were
casting a pointer to a physical address which represents an integer of a
different size. Per the suggestion of Peter Anvin I am replacing it and one
other spot where I made a similar cast with an unsigned long.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Link: http://lkml.kernel.org/r/20121119182927.3655.7641.stgit@ahduyck-cp1.jf.intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/kernel/head32.c | 2 +-
arch/x86/kernel/head64.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
index f15db0c..e175548 100644
--- a/arch/x86/kernel/head32.c
+++ b/arch/x86/kernel/head32.c
@@ -31,7 +31,7 @@ static void __init i386_default_early_setup(void)
void __init i386_start_kernel(void)
{
memblock_reserve(__pa_symbol(_text),
- (phys_addr_t)__bss_stop - (phys_addr_t)_text);
+ (unsigned long)__bss_stop - (unsigned long)_text);
#ifdef CONFIG_BLK_DEV_INITRD
/* Reserve INITRD */
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 42f5df1..7b215a5 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -98,7 +98,7 @@ void __init x86_64_start_reservations(char *real_mode_data)
copy_bootdata(__va(real_mode_data));
memblock_reserve(__pa_symbol(_text),
- (phys_addr_t)__bss_stop - (phys_addr_t)_text);
+ (unsigned long)__bss_stop - (unsigned long)_text);
#ifdef CONFIG_BLK_DEV_INITRD
/* Reserve INITRD */
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-19 20:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-19 17:10 [PATCH] x86: Fix warning about cast from pointer to integer of different size Alexander Duyck
2012-11-19 18:31 ` [RESEND][PATCH] " Alexander Duyck
2012-11-19 20:01 ` [tip:x86/mm] " tip-bot for Alexander Duyck
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.