On Mon, 3 Mar 2025 15:26:03 +0800 Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx> wrote: > Now, the nine architectures of csky, hexagon, loongarch, m68k, mips, > nios2, openrisc, sh and um do not select CONFIG_MMU_GATHER_RCU_TABLE_FREE, > and just call pagetable_dtor() + tlb_remove_page_ptdesc() (the wrapper of > tlb_remove_page()). This is the same as the implementation of > tlb_remove_{ptdesc|table}() under !CONFIG_MMU_GATHER_TABLE_FREE, so > convert these architectures to use tlb_remove_ptdesc(). > checkpatch warns. Do these things have to be macros? Switching to static inline fixes the unused-arg warning in a nice fashion. I'll fix the trailing-semicolon issue locally. WARNING: Argument 'address' is not used in function-like macro #51: FILE: arch/csky/include/asm/pgalloc.h:64: +#define __pte_free_tlb(tlb, pte, address) \ + tlb_remove_ptdesc((tlb), page_ptdesc(pte)) WARNING: Argument 'addr' is not used in function-like macro #66: FILE: arch/hexagon/include/asm/pgalloc.h:90: +#define __pte_free_tlb(tlb, pte, addr) \ + tlb_remove_ptdesc((tlb), page_ptdesc(pte)) WARNING: Argument 'address' is not used in function-like macro #80: FILE: arch/loongarch/include/asm/pgalloc.h:58: +#define __pte_free_tlb(tlb, pte, address) \ + tlb_remove_ptdesc((tlb), page_ptdesc(pte)); WARNING: macros should not use a trailing semicolon #80: FILE: arch/loongarch/include/asm/pgalloc.h:58: +#define __pte_free_tlb(tlb, pte, address) \ + tlb_remove_ptdesc((tlb), page_ptdesc(pte)); WARNING: Argument 'addr' is not used in function-like macro #95: FILE: arch/m68k/include/asm/sun3_pgalloc.h:20: +#define __pte_free_tlb(tlb, pte, addr) \ + tlb_remove_ptdesc((tlb), page_ptdesc(pte)) WARNING: Argument 'address' is not used in function-like macro #110: FILE: arch/mips/include/asm/pgalloc.h:51: +#define __pte_free_tlb(tlb, pte, address) \ + tlb_remove_ptdesc((tlb), page_ptdesc(pte)) WARNING: Argument 'addr' is not used in function-like macro #125: FILE: arch/nios2/include/asm/pgalloc.h:31: +#define __pte_free_tlb(tlb, pte, addr) \ + tlb_remove_ptdesc((tlb), page_ptdesc(pte)) WARNING: Argument 'addr' is not used in function-like macro #139: FILE: arch/openrisc/include/asm/pgalloc.h:67: +#define __pte_free_tlb(tlb, pte, addr) \ + tlb_remove_ptdesc((tlb), page_ptdesc(pte)) WARNING: Argument 'addr' is not used in function-like macro #153: FILE: arch/sh/include/asm/pgalloc.h:35: +#define __pte_free_tlb(tlb, pte, addr) \ + tlb_remove_ptdesc((tlb), page_ptdesc(pte)) WARNING: Argument 'address' is not used in function-like macro #167: FILE: arch/um/include/asm/pgalloc.h:28: +#define __pte_free_tlb(tlb, pte, address) \ + tlb_remove_ptdesc((tlb), page_ptdesc(pte)) WARNING: Argument 'address' is not used in function-like macro #176: FILE: arch/um/include/asm/pgalloc.h:33: +#define __pmd_free_tlb(tlb, pmd, address) \ + tlb_remove_ptdesc((tlb), virt_to_ptdesc(pmd)) WARNING: Argument 'address' is not used in function-like macro #185: FILE: arch/um/include/asm/pgalloc.h:38: +#define __pud_free_tlb(tlb, pud, address) \ + tlb_remove_ptdesc((tlb), virt_to_ptdesc(pud)) total: 0 errors, 12 warnings, 122 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. ./patches/mm-pgtable-convert-some-architectures-to-use-tlb_remove_ptdesc-v2.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.