From: Russell King Date: Sat, 29 Oct 2005 12:18:10 +0000 (+0100) Subject: [ARM] Fix buggy __phys_to_pfn / __pfn_to_phys X-Git-Tag: v2.6.15-rc1~731^2^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8c18fe2562c45180c407872d05857c55c1e5e37b;p=platform%2Fkernel%2Flinux-3.10.git [ARM] Fix buggy __phys_to_pfn / __pfn_to_phys Macro arguments should _always_ be surrounded by parentheses when used to prevent unexpected problems with operator precedence. Signed-off-by: Russell King --- diff --git a/include/asm-arm/mach/map.h b/include/asm-arm/mach/map.h index 0619522..b338936 100644 --- a/include/asm-arm/mach/map.h +++ b/include/asm-arm/mach/map.h @@ -27,8 +27,8 @@ struct meminfo; #define MT_ROM 6 #define MT_IXP2000_DEVICE 7 -#define __phys_to_pfn(paddr) (paddr >> PAGE_SHIFT) -#define __pfn_to_phys(pfn) (pfn << PAGE_SHIFT) +#define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT) +#define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) extern void create_memmap_holes(struct meminfo *); extern void memtable_init(struct meminfo *);