[PATCH v10 3/9] powerpc/mm: Remove extern from function prototypes

Christophe Leroy christophe.leroy at csgroup.eu
Wed Nov 9 17:16:26 AEDT 2022



Le 09/11/2022 à 05:51, Benjamin Gray a écrit :
> Remove the extern keyword from function declarations. It is redundant
> and would cause inconsistent style when new functions are added without
> it.
> 
> Signed-off-by: Benjamin Gray <bgray at linux.ibm.com>


Reviewed-by: Christophe Leroy <christophe.leroy at csgroup.eu>


Allthough the style inconsistency is not a good argument from my point 
of view. Such style changes can soon become a nightmare with backporting 
to stable.

In small villages, do you build new houses with the style of old houses 
only ? Or do you destroy all old houses in order to rebuild all of them 
with more modern style ?

> ---
> v10:	* New in v10 for consistency with new functions
> ---
>   .../include/asm/book3s/64/tlbflush-hash.h     | 19 +++++++++---------
>   arch/powerpc/include/asm/nohash/tlbflush.h    | 20 +++++++++----------
>   2 files changed, 18 insertions(+), 21 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h b/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h
> index fab8332fe1ad..3c89e625e620 100644
> --- a/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h
> +++ b/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h
> @@ -22,7 +22,7 @@ struct ppc64_tlb_batch {
>   };
>   DECLARE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch);
>   
> -extern void __flush_tlb_pending(struct ppc64_tlb_batch *batch);
> +void __flush_tlb_pending(struct ppc64_tlb_batch *batch);
>   
>   #define __HAVE_ARCH_ENTER_LAZY_MMU_MODE
>   
> @@ -51,14 +51,13 @@ static inline void arch_leave_lazy_mmu_mode(void)
>   
>   #define arch_flush_lazy_mmu_mode()      do {} while (0)
>   
> -extern void hash__tlbiel_all(unsigned int action);
> +void hash__tlbiel_all(unsigned int action);
>   
> -extern void flush_hash_page(unsigned long vpn, real_pte_t pte, int psize,
> -			    int ssize, unsigned long flags);
> -extern void flush_hash_range(unsigned long number, int local);
> -extern void flush_hash_hugepage(unsigned long vsid, unsigned long addr,
> -				pmd_t *pmdp, unsigned int psize, int ssize,
> -				unsigned long flags);
> +void flush_hash_page(unsigned long vpn, real_pte_t pte, int psize, int ssize,
> +		     unsigned long flags);
> +void flush_hash_range(unsigned long number, int local);
> +void flush_hash_hugepage(unsigned long vsid, unsigned long addr, pmd_t *pmdp,
> +			 unsigned int psize, int ssize, unsigned long flags);
>   static inline void hash__local_flush_tlb_mm(struct mm_struct *mm)
>   {
>   }
> @@ -111,11 +110,11 @@ static inline void hash__flush_tlb_kernel_range(unsigned long start,
>   
>   
>   struct mmu_gather;
> -extern void hash__tlb_flush(struct mmu_gather *tlb);
> +void hash__tlb_flush(struct mmu_gather *tlb);
>   
>   #ifdef CONFIG_PPC_64S_HASH_MMU
>   /* Private function for use by PCI IO mapping code */
> -extern void __flush_hash_table_range(unsigned long start, unsigned long end);
> +void __flush_hash_table_range(unsigned long start, unsigned long end);
>   void flush_hash_table_pmd_range(struct mm_struct *mm, pmd_t *pmd, unsigned long addr);
>   #else
>   static inline void __flush_hash_table_range(unsigned long start, unsigned long end) { }
> diff --git a/arch/powerpc/include/asm/nohash/tlbflush.h b/arch/powerpc/include/asm/nohash/tlbflush.h
> index bdaf34ad41ea..0cef5e4f8d92 100644
> --- a/arch/powerpc/include/asm/nohash/tlbflush.h
> +++ b/arch/powerpc/include/asm/nohash/tlbflush.h
> @@ -28,8 +28,7 @@ struct mm_struct;
>   
>   #define MMU_NO_CONTEXT      	((unsigned int)-1)
>   
> -extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
> -			    unsigned long end);
> +void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end);
>   
>   #ifdef CONFIG_PPC_8xx
>   static inline void local_flush_tlb_mm(struct mm_struct *mm)
> @@ -55,19 +54,18 @@ static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end
>   		asm volatile ("sync; tlbia; isync" : : : "memory");
>   }
>   #else
> -extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
> -extern void local_flush_tlb_mm(struct mm_struct *mm);
> -extern void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
> +void flush_tlb_kernel_range(unsigned long start, unsigned long end);
> +void local_flush_tlb_mm(struct mm_struct *mm);
> +void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
>   
> -extern void __local_flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr,
> -				   int tsize, int ind);
> +void __local_flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr,
> +			    int tsize, int ind);
>   #endif
>   
>   #ifdef CONFIG_SMP
> -extern void flush_tlb_mm(struct mm_struct *mm);
> -extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
> -extern void __flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr,
> -			     int tsize, int ind);
> +void flush_tlb_mm(struct mm_struct *mm);
> +void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
> +void __flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, int tsize, int ind);
>   #else
>   #define flush_tlb_mm(mm)		local_flush_tlb_mm(mm)
>   #define flush_tlb_page(vma,addr)	local_flush_tlb_page(vma,addr)


More information about the Linuxppc-dev mailing list