Messages in this thread | | | Subject | Re: [PATCH] Fix virt_to_phys() warnings | From | Andi Kleen <> | Date | Thu, 02 Jul 2009 09:07:46 +0200 |
| |
Andrew Morton <akpm@linux-foundation.org> writes: > > #define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr))) > > thereby passing an `unsigned long' where a void* was expected. > > > So perhaps something along these lines:
I'm not quite sure it's the case on MIPS, but I remember on x86 one of the reasons this was done as a macro was to avoid a include dependency loop with struct page.
-Andi
-- ak@linux.intel.com -- Speaking for myself only.
| |