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: 2d78057f0d ("asm-generic/page.h: Make pfn accessors static inlines")
Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
This commit is contained in:
Hajime Tazaki
2024-05-13 09:37:11 +09:00
parent 908ae7e081
commit ff70c1610a

View File

@@ -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