From ff70c1610a6276f335800a848c154cdc2c71130b Mon Sep 17 00:00:00 2001 From: Hajime Tazaki Date: Mon, 13 May 2024 09:37:11 +0900 Subject: [PATCH] lkl: follow up fix after v6.6 merge (PAGE_SHIFT) As nommu architecture uses __va definition in asm-generic, it is casted with (void*) after the macro. But pfn_to_virt definition is using shift operation after the cast so, compilers raise warnings/errors/ I suppose this is an upstream bug when they introduce the commit. Fixes: 2d78057f0dd4 ("asm-generic/page.h: Make pfn accessors static inlines") Signed-off-by: Hajime Tazaki --- include/asm-generic/page.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/page.h b/include/asm-generic/page.h index 9773582fd96e..9e9c5fe11803 100644 --- a/include/asm-generic/page.h +++ b/include/asm-generic/page.h @@ -81,7 +81,7 @@ static inline unsigned long virt_to_pfn(const void *kaddr) #define virt_to_pfn virt_to_pfn static inline void *pfn_to_virt(unsigned long pfn) { - return __va(pfn) << PAGE_SHIFT; + return __va((pfn) << PAGE_SHIFT); } #define pfn_to_virt pfn_to_virt