Commit f54bcdc2 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

m68k: Eliminate unused variable in page_to_phys()

"pgdat" is unused, so we can eliminate it and turn page_to_phys()
into a single-line macro.
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent 5da3a65d
...@@ -31,12 +31,7 @@ static inline void *phys_to_virt(unsigned long address) ...@@ -31,12 +31,7 @@ static inline void *phys_to_virt(unsigned long address)
#define page_to_phys(page) \ #define page_to_phys(page) \
__pa(PAGE_OFFSET + (((page) - pg_data_map[0].node_mem_map) << PAGE_SHIFT)) __pa(PAGE_OFFSET + (((page) - pg_data_map[0].node_mem_map) << PAGE_SHIFT))
#else #else
#define page_to_phys(_page) ({ \ #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
struct page *__page = _page; \
struct pglist_data *pgdat; \
pgdat = pg_data_table[page_to_nid(__page)]; \
page_to_pfn(__page) << PAGE_SHIFT; \
})
#endif #endif
#else #else
#define page_to_phys(page) (((page) - mem_map) << PAGE_SHIFT) #define page_to_phys(page) (((page) - mem_map) << PAGE_SHIFT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment