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 <[email protected]>
---
 kexec/arch/ppc/kexec-ppc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kexec/arch/ppc/kexec-ppc.c b/kexec/arch/ppc/kexec-ppc.c
index d3dad0f..e173433 100644
--- a/kexec/arch/ppc/kexec-ppc.c
+++ b/kexec/arch/ppc/kexec-ppc.c
@@ -91,7 +91,7 @@ int read_memory_region_limits(int fd, unsigned long long 
*start,
                                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 @@ int read_memory_region_limits(int fd, unsigned long long 
*start,
                return -1;
        }
 
-       p = (unsigned long*)buf;
+       p = (unsigned long long*)buf;
        if (dt_address_cells == sizeof(unsigned long)) {
                *start = p[0];
                p++;
-- 
2.47.3


Reply via email to