From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: kexec@lists.infradead.org
Cc: horms@verge.net.au, Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 2/4] kexec: i386: Fix format specifiers for various printf() and scanf()
Date: Mon, 14 Oct 2024 18:31:27 +0300 [thread overview]
Message-ID: <20241014153129.295176-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20241014153129.295176-1-andriy.shevchenko@linux.intel.com>
Compiler is not happy when wrong specifier is being used.
Fix them all.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@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
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2024-10-14 15:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 15:31 [PATCH v1 1/4] kexec: i386: Fix 32-bit right shifts on 32-bit architectures Andy Shevchenko
2024-10-14 15:31 ` Andy Shevchenko [this message]
2024-10-14 15:31 ` [PATCH v1 3/4] util_lib/elf_info: Fix format specifiers for fprintf() Andy Shevchenko
2024-10-14 15:31 ` [PATCH v1 4/4] build: Update configure.ac to follow the changes Andy Shevchenko
2024-10-14 16:24 ` [PATCH v1 1/4] kexec: i386: Fix 32-bit right shifts on 32-bit architectures Simon Horman
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=20241014153129.295176-2-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox