From: Scott Wood Date: Thu, 24 Mar 2011 11:51:19 +0000 (+0000) Subject: powerpc: ARCH_PFN_OFFSET should be unsigned long X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=67eb54944bb9de5f568ea2c28d4f20a5b7d2611d;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git powerpc: ARCH_PFN_OFFSET should be unsigned long pfns are unsigned long, but MEMORY_START is phys_addr_t. This leads to page_to_pfn() returning phys_addr_t, and thus type mismatches in a few print statements. Signed-off-by: Scott Wood Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h index da4b2000854..2cd664ef0a5 100644 --- a/arch/powerpc/include/asm/page.h +++ b/arch/powerpc/include/asm/page.h @@ -100,7 +100,7 @@ extern phys_addr_t kernstart_addr; #endif #ifdef CONFIG_FLATMEM -#define ARCH_PFN_OFFSET (MEMORY_START >> PAGE_SHIFT) +#define ARCH_PFN_OFFSET ((unsigned long)(MEMORY_START >> PAGE_SHIFT)) #define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr) #endif