nios2: use correct void* return type for page_to_virt()
To align with other architectures, the expression produced by expanding the macro page_to_virt() should be of type void*, since it returns a virtual address. Fix that, and also fix up an instance where page_to_virt was expected to return 'unsigned long', and drop another instance that was entirely unused (page_to_bus) Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
parent
921b1f52c9
commit
046982c760
|
@ -50,7 +50,6 @@ static inline void iounmap(void __iomem *addr)
|
|||
|
||||
/* Pages to physical address... */
|
||||
#define page_to_phys(page) virt_to_phys(page_to_virt(page))
|
||||
#define page_to_bus(page) page_to_virt(page)
|
||||
|
||||
/* Macros used for converting between virtual and physical mappings. */
|
||||
#define phys_to_virt(vaddr) \
|
||||
|
|
|
@ -84,7 +84,7 @@ extern struct page *mem_map;
|
|||
((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET))
|
||||
|
||||
#define page_to_virt(page) \
|
||||
((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)
|
||||
((void *)(((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)
|
||||
|
||||
# define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
|
||||
# define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && \
|
||||
|
|
|
@ -209,7 +209,7 @@ static inline void set_pte(pte_t *ptep, pte_t pteval)
|
|||
static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
||||
pte_t *ptep, pte_t pteval)
|
||||
{
|
||||
unsigned long paddr = page_to_virt(pte_page(pteval));
|
||||
unsigned long paddr = (unsigned long)page_to_virt(pte_page(pteval));
|
||||
|
||||
flush_dcache_range(paddr, paddr + PAGE_SIZE);
|
||||
set_pte(ptep, pteval);
|
||||
|
|
Loading…
Reference in a new issue