提交 8c18fe25 编写于 作者: R Russell King 提交者: Russell King

[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: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 fb31690f
......@@ -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 *);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册