mm/mmu_gather: change __tlb_remove_tlb_entry() to an inline function
PATCH 1/1 mm/mmu_gather: change __tlb_remove_tlb_entry() to an inline function
From: Arnd Bergmann <[email protected]>
clang complains about tlb_remove_tlb_entries() not using the 'ptep' variable when __tlb_remove_tlb_entry() is an empty macro:
include/asm-generic/tlb.h:627:10: error: parameter 'ptep' set but not used [-Werror,-Wunused-but-set-parameter]
Change it to an equivalent inline function that avoids the warning since the compiler can see how the variable gets passed into it.
--- include/asm-generic/tlb.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
include/asm-generic/tlb.h +3 -1
@@ -600,7 +600,9 @@ static inline void tlb_flush_p4d_range(struct mmu_gather *tlb, }#ifndef __tlb_remove_tlb_entry -#define __tlb_remove_tlb_entry (tlb, ptep, address) do { } while (0) +static inline void __tlb_remove_tlb_entry (struct mmu_gather *tlb,pte_t *ptep,unsigned long address) +{ +}#endif /**
Signature · 1 line
2.39.2
Quoted 2 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Hi Arnd,
Quoted 8 lines
clang complains about
tlb_remove_tlb_entries()not using the 'ptep' variable when__tlb_remove_tlb_entry()is an empty macro:
include/asm-generic/tlb.h:627:10: error: parameter 'ptep' set but not used [-Werror,-Wunused-but-set-parameter]Change it to an equivalent inline function that avoids the warning since the compiler can see how the variable gets passed into it.
Ugh, quite an annoying clang behavior in this particular case. I wonder why no build bot complained so far.
Thanks!
Quoted 1 line
Fixes 66958b447695 ("mm/mmu_gather: add tlb_remove_tlb_entries()")
That commit id is not stable yet. So Andrew might want to fold it into that commit before moving it to mm-stable.
Signature · 3 lines
Cheers, David / dhildenb