[PATCH v1 2/4] kexec: i386: Fix format specifiers for various printf() and scanf()
Andy Shevchenko
andriy.shevchenko at linux.intel.com
Mon Oct 14 08:31:27 PDT 2024
Compiler is not happy when wrong specifier is being used.
Fix them all.
Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
---
kexec/arch/i386/crashdump-x86.c | 2 +-
kexec/arch/i386/kexec-x86-common.c | 2 +-
kexec/arch/i386/x86-linux-setup.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index a01031e570aa..800ae2c28da8 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -784,7 +784,7 @@ static void cmdline_add_efi(char *cmdline)
if (!acpi_rsdp)
return;
- sprintf(acpi_rsdp_buf, " acpi_rsdp=0x%lx", acpi_rsdp);
+ sprintf(acpi_rsdp_buf, " acpi_rsdp=0x%llx", acpi_rsdp);
if (strlen(cmdline) + strlen(acpi_rsdp_buf) > (COMMAND_LINE_SIZE - 1))
die("Command line overflow\n");
diff --git a/kexec/arch/i386/kexec-x86-common.c b/kexec/arch/i386/kexec-x86-common.c
index ffc95a9e43f8..67da043f9441 100644
--- a/kexec/arch/i386/kexec-x86-common.c
+++ b/kexec/arch/i386/kexec-x86-common.c
@@ -422,7 +422,7 @@ static uint64_t efi_get_acpi_rsdp(void) {
/* ACPI20= always goes before ACPI= */
if ((strstr(line, "ACPI20=")) || (strstr(line, "ACPI="))) {
s = strchr(line, '=') + 1;
- sscanf(s, "0x%lx", &acpi_rsdp);
+ sscanf(s, "0x%llx", &acpi_rsdp);
break;
}
}
diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c
index efb6e2cba508..1f96372c469f 100644
--- a/kexec/arch/i386/x86-linux-setup.c
+++ b/kexec/arch/i386/x86-linux-setup.c
@@ -760,7 +760,7 @@ static void add_e820_map_from_mr(struct x86_linux_param_header *real_mode,
e820[i].type = E820_RESERVED;
break;
}
- dbgprintf("%016lx-%016lx (%d)\n",
+ dbgprintf("%016llx-%016llx (%d)\n",
e820[i].addr,
e820[i].addr + e820[i].size - 1,
e820[i].type);
--
2.43.0.rc1.1336.g36b5255a03ac
More information about the kexec
mailing list