Skip to content

Commit

Permalink
m68knommu: make non-MMU page_to_virt() return a void *
Browse files Browse the repository at this point in the history
The page_to_virt() macro for m68knommu is currently effectively returning
an int type. But the equivilent m68k macro returns a void * virtual address.
Modify the non-MMU macro to return a void * as well (using the __va macro).

This change will remove compiler warnings in common m68k code that use this
macro.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
  • Loading branch information
Greg Ungerer committed Dec 5, 2012
1 parent 5a4acf3 commit 3c46041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/m68k/include/asm/page_no.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extern unsigned long memory_end;
#define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT)

#define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT))
#define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)
#define page_to_virt(page) __va(((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET))

#define pfn_to_page(pfn) virt_to_page(pfn_to_virt(pfn))
#define page_to_pfn(page) virt_to_pfn(page_to_virt(page))
Expand Down

0 comments on commit 3c46041

Please sign in to comment.