Skip to contentSkip to conversation

LoongArch/tlb: fix "error: parameter 'ptep' set but not used" due to __tlb_remove_tlb_entry()

PATCH Applied David Hildenbrand 4 participants 5 messages Apr 16, 2024 – Apr 18, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 LoongArch/tlb: fix "error: parameter 'ptep' set but not used" due to __tlb_remove_tlb_entry()

With LLVM=1 and W=1 we get:

./include/asm-generic/tlb.h:629:10: error: parameter 'ptep' set but not used [-Werror,-Wunused-but-set-parameter]

We fixed a similar issue via Arnd in the introducing commit, missed the loongarch variant. Turns out, there is no need for loongarch to have a custom variant, so let's just drop it and rely on the asm-generic one.

Fixes 4d5bf0b6183f ("mm/mmu_gather: add tlb_remove_tlb_entries()")
Cc Andrew Morton <[email protected]>
Cc Huacai Chen <[email protected]>
Cc WANG Xuerui <[email protected]>
Cc Nathan Chancellor <[email protected]>
---
 arch/loongarch/include/asm/tlb.h | 2 --
 1 file changed, 2 deletions(-)
arch/loongarch/include/asm/tlb.h +0 -2
index da7a3b5b9374a..e071f5e9e8580 100644
@@ -132,8 +132,6 @@ static __always_inline void invtlb_all(u32 op, u32 info, u64 addr)
 		);
 }
 
-#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
-
 static void tlb_flush(struct mmu_gather *tlb);
 
 #define tlb_flush tlb_flush
Signature · 1 line
2.44.0
maintainer
#3 lore raw
Quoted 11 lines · On Wed, 17 Apr 2024 11:18:27 +0800 Huacai Chen <[email protected]> wrote:
Quoted 9 lines · Miguel Ojeda
Quoted 2 lines · David Hildenbrand

With LLVM=1 and W=1 we get:

Hmm... I didn't need W=1 to trigger it (LLVM 18.1.2).

Quoted 1 line
Quoted 8 lines
Quoted 5 lines

Thanks, looks good to me -- built-tested:

Queued for loongarch-fixes, thanks.

(top-posting repaired so I can sensibly reply to this. Please avoid top-posting!)

I'd rather carry this in mm.git with your ack please. Otherwise mm.git won't compile without it and if I retain this patch we'll get duplicate-patch emails from Stephen and I won't be able to merge mm.git's mm-nonmm-stable tree into Linus until loongarch-fixes has merged.

maintainer
#4 lore raw

Hi, Andrew,

Quoted 20 lines · Andrew Morton
Quoted 17 lines · On Wed, 17 Apr 2024 11:18:27 +0800 Huacai Chen <[email protected]> wrote:
Quoted 14 lines · Miguel Ojeda
Quoted 2 lines · David Hildenbrand

With LLVM=1 and W=1 we get:

Hmm... I didn't need W=1 to trigger it (LLVM 18.1.2).

Quoted 1 line

Thanks, looks good to me -- built-tested:

Quoted 5 lines
Quoted 2 lines

Queued for loongarch-fixes, thanks.

(top-posting repaired so I can sensibly reply to this. Please avoid top-posting!)

Sorry, I only top-posting with "Queued ...", "Applied ..." because I saw others do like this. If this is also unacceptable, I will not do it again.

Quoted 6 lines

I'd rather carry this in mm.git with your ack please. Otherwise mm.git won't compile without it and if I retain this patch we'll get duplicate-patch emails from Stephen and I won't be able to merge mm.git's mm-nonmm-stable tree into Linus until loongarch-fixes has merged.

loongarch-next always merges loongarch-fixes, so when I apply a patch it will be in linux-next. Now this patch I have already applied to loongarch-fixes and loongarch-next. In future, I will give an Acked-by for you if needed.

Huacai

Quoted 2 lines