[PATCH 2/4] crashdump-ppc64: Fix integer truncation warning

Geoff Levand geoff at infradead.org
Thu Apr 12 03:03:11 AEST 2018


Fixes warnings like these when building kexec for powerpc (32 bit):

  crashdump-ppc64.h: warning: large integer implicitly truncated to unsigned type

Signed-off-by: Geoff Levand <geoff at infradead.org>
---
 kexec/arch/ppc64/crashdump-ppc64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kexec/arch/ppc64/crashdump-ppc64.h b/kexec/arch/ppc64/crashdump-ppc64.h
index 87beb39..b0cba8a 100644
--- a/kexec/arch/ppc64/crashdump-ppc64.h
+++ b/kexec/arch/ppc64/crashdump-ppc64.h
@@ -14,7 +14,7 @@ void add_usable_mem_rgns(unsigned long long base, unsigned long long size);
 #define VMALLOCBASE     0xD000000000000000ULL
 
 #define __pa(x)         ((unsigned long)(x)-PAGE_OFFSET)
-#define MAXMEM          (-KERNELBASE-VMALLOCBASE)
+#define MAXMEM          (-(unsigned long)(KERNELBASE-VMALLOCBASE))
 
 #define COMMAND_LINE_SIZE       2048 /* from kernel */
 /* Backup Region, First 64K of System RAM. */
-- 
2.14.1




More information about the Petitboot mailing list