arm64: memory: Rewrite default page_to_virt()/virt_to_page()
The default implementations of page_to_virt() and virt_to_page() are fairly confusing to read and the former evaluates its 'page' parameter twice in the macro Rewrite them so that the computation is expressed as 'base + index' in both cases and the parameter is always evaluated exactly once. Tested-by: NSteve Capper <steve.capper@arm.com> Reviewed-by: NSteve Capper <steve.capper@arm.com> Tested-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com> Signed-off-by: NWill Deacon <will@kernel.org>
Showing
想要评论请 注册 或 登录