1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
From 8ac3a7e08957fcb3fa59c9fc4e9c283b9a072ce6 Mon Sep 17 00:00:00 2001
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date: Wed, 22 Oct 2025 13:44:13 +0200
Subject: [PATCH] kexec-tools: powerpc: Fix pointer declarations in
read_memory_region_limits()
Fixes the following two build errors on 32-bit PowerPC:
kexec/arch/ppc/kexec-ppc.c: In function 'read_memory_region_limits':
kexec/arch/ppc/kexec-ppc.c:106:11: error: assignment to 'long long unsigned int *' from incompatible pointer type 'long unsigned int *' [-Wincompatible-pointer-types]
106 | p = (unsigned long*)buf;
| ^
kexec/arch/ppc/kexec-ppc.c: In function 'read_memory_region_limits':
kexec/arch/ppc/kexec-ppc.c:112:19: error: assignment to 'long unsigned int *' from incompatible pointer type 'long long unsigned int *' [-Wincompatible-pointer-types]
112 | p = (unsigned long long *)p + 1;
| ^
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Reviewed-by: Khalid Aziz <khalid@gonehiking.org>
Signed-off-by: Simon Horman <horms@kernel.org>
---
kexec/arch/ppc/kexec-ppc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/kexec/arch/ppc/kexec-ppc.c
+++ b/kexec/arch/ppc/kexec-ppc.c
@@ -91,7 +91,7 @@
unsigned long long *end)
{
char buf[MAXBYTES];
- unsigned long *p;
+ unsigned long long *p;
unsigned long nbytes = dt_address_cells + dt_size_cells;
if (lseek(fd, 0, SEEK_SET) == -1) {
@@ -103,7 +103,7 @@
return -1;
}
- p = (unsigned long*)buf;
+ p = (unsigned long long*)buf;
if (dt_address_cells == sizeof(unsigned long)) {
*start = p[0];
p++;
|