summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/mach
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-10-29 13:18:10 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-10-29 13:18:10 +0100
commit8c18fe2562c45180c407872d05857c55c1e5e37b (patch)
tree52b4b8e5b501aaf614504e85f3a458704906a55f /include/asm-arm/mach
parentfb31690fbac6f4055c1765522752e4746759f5de (diff)
downloadop-kernel-dev-8c18fe2562c45180c407872d05857c55c1e5e37b.zip
op-kernel-dev-8c18fe2562c45180c407872d05857c55c1e5e37b.tar.gz
[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 <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/mach')
-rw-r--r--include/asm-arm/mach/map.h4
1 files changed, 2 insertions, 2 deletions
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 *);
OpenPOWER on IntegriCloud