Skip to contentSkip to conversation

um: tlb: Remove unused flush_tlb_mm_range function

PATCH In review Ivan Orlov 2 participants 2 messages Apr 14, 2024 – Apr 15, 2024 User-mode Linux (UML)

lore
Share & tools
lore

Ivan Orlov

author
#0 lore raw

PATCH 1/1 um: tlb: Remove unused flush_tlb_mm_range function

GCC 11.4.0 produces the following warning when compiling the kernel for UML architecture (with UML defconfig):

arch/um/kernel/tlb.c:579:6: warning: no previous prototype for ‘flush_tlb_mm_range’ [-Wmissing-prototypes]
579 | void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,)

This function is not used anywhere. It is not exported with EXPORT_SYMBOL either, and therefore it is not usable for dynamically loaded modules. Remove this function.

---
 arch/um/kernel/tlb.c | 6 ------
 1 file changed, 6 deletions(-)
arch/um/kernel/tlb.c +0 -6
index 7d050ab0f78a..70b5e47e9761 100644
@@ -576,12 +576,6 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
 }
 EXPORT_SYMBOL(flush_tlb_range);
 
-void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
-			unsigned long end)
-{
-	fix_range(mm, start, end, 0);
-}
-
 void flush_tlb_mm(struct mm_struct *mm)
 {
 	struct vm_area_struct *vma;
Signature · 1 line
2.34.1
#1 lore raw
Quoted 22 lines · Ivan Orlov

GCC 11.4.0 produces the following warning when compiling the kernel for UML architecture (with UML defconfig):

arch/um/kernel/tlb.c:579:6: warning: no previous prototype for ‘flush_tlb_mm_range’ [-Wmissing-prototypes]
579 | void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,)

This function is not used anywhere. It is not exported with EXPORT_SYMBOL either, and therefore it is not usable for dynamically loaded modules. Remove this function.

---
 arch/um/kernel/tlb.c | 6 ------
 1 file changed, 6 deletions(-)
arch/um/kernel/tlb.c +0 -0
index 7d050ab0f78a..70b5e47e9761 100644
@@ -576,12 +576,6 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
 }
 EXPORT_SYMBOL(flush_tlb_range);

arch/um/kernel/tlb.c void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, · line 581

Quoted 10 lines
arch/um/kernel/tlb.c +0 -6
 
-void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
-			unsigned long end)
-{
-	fix_range(mm, start, end, 0);
-}
-
 void flush_tlb_mm(struct mm_struct *mm)
 {
 	struct vm_area_struct *vma;

Thanks for the patch. I also posted a fix for this earlier (but not merged yet):

https://lore.kernel.org/linux-um/[email protected]/

Regards,
Tiwei