[PATCH kexec-tools] ppc64: Fix minor build warnings

Shivang Upadhyay shivangu at linux.ibm.com
Tue Dec 2 02:22:36 PST 2025


ppc64 target compiles warning free now.

Cc: Sourabh Jain <sourabhjain at linux.ibm.com>
Signed-off-by: Shivang Upadhyay <shivangu at linux.ibm.com>
---
 kexec/arch/ppc64/fdt.c                 | 2 +-
 kexec/arch/ppc64/kexec-elf-rel-ppc64.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kexec/arch/ppc64/fdt.c b/kexec/arch/ppc64/fdt.c
index 879240f..bb57b3e 100644
--- a/kexec/arch/ppc64/fdt.c
+++ b/kexec/arch/ppc64/fdt.c
@@ -140,7 +140,7 @@ static int get_threads_per_cpu(char *path)
  *
  * Returns total number of present CPUs on success, -1 on failure.
  */
-static int get_present_cpus()
+static int get_present_cpus(void)
 {
 	char *range;
 	char buf[1024];
diff --git a/kexec/arch/ppc64/kexec-elf-rel-ppc64.c b/kexec/arch/ppc64/kexec-elf-rel-ppc64.c
index 51b1354..4e00848 100644
--- a/kexec/arch/ppc64/kexec-elf-rel-ppc64.c
+++ b/kexec/arch/ppc64/kexec-elf-rel-ppc64.c
@@ -104,7 +104,7 @@ void machine_apply_elf_rel(struct mem_ehdr *ehdr, struct mem_sym *sym,
 		break;
 
 	case R_PPC64_REL32:
-		*(uint32_t *)location = value - (uint32_t)location;
+		*(uint32_t *)location = value - (uintptr_t)location;
 		break;
 
 	case R_PPC64_TOC:
-- 
2.51.0




More information about the kexec mailing list