[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1587645588-7130-3-git-send-email-vamshi.k.sthambamkadi@gmail.com>
Date: Thu, 23 Apr 2020 18:09:48 +0530
From: Vamshi K Sthambamkadi <vamshi.k.sthambamkadi@...il.com>
To: bp@...en8.de, tglx@...utronix.de, mingo@...hat.com, hpa@...or.com
Cc: Vamshi K Sthambamkadi <vamshi.k.sthambamkadi@...il.com>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v3 2/2] x86: fix build warning int-to-pointer-cast
Fix warning on x86_32:
arch/x86/boot/compressed/acpi.c:316:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
This is because on 32 bit, cast of acpi_physical_address(u64) to rsdp
pointer in get_acpi_srat_table() triggers this warning.
Signed-off-by: Vamshi K Sthambamkadi <vamshi.k.sthambamkadi@...il.com>
---
arch/x86/boot/compressed/acpi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/boot/compressed/acpi.c b/arch/x86/boot/compressed/acpi.c
index ef2ad72..2fd81f1 100644
--- a/arch/x86/boot/compressed/acpi.c
+++ b/arch/x86/boot/compressed/acpi.c
@@ -280,9 +280,9 @@ acpi_physical_address get_rsdp_addr(void)
*/
#define MAX_ADDR_LEN 19
-static acpi_physical_address get_cmdline_acpi_rsdp(void)
+static unsigned long get_cmdline_acpi_rsdp(void)
{
- acpi_physical_address addr = 0;
+ unsigned long addr = 0;
#ifdef CONFIG_KEXEC
char val[MAX_ADDR_LEN] = { };
@@ -292,7 +292,7 @@ static acpi_physical_address get_cmdline_acpi_rsdp(void)
if (ret < 0)
return 0;
- if (kstrtoull(val, 16, &addr))
+ if (kstrtoul(val, 16, &addr))
return 0;
#endif
return addr;
--
2.7.4
Powered by blists - more mailing lists