diff mbox series

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

Message ID 84f6e4bceae52c95432b79562ab2d8011b1c1e5e.1523465700.git.geoff@infradead.org
State Not Applicable
Headers show
Series [1/4] kexec: Fix printf warning | expand

Commit Message

Geoff Levand April 11, 2018, 5:03 p.m. UTC
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@infradead.org>
---
 kexec/arch/ppc64/crashdump-ppc64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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. */