[PATCH 3/9] powerpc/mm: Remove extern from function definition
LEROY Christophe
christophe.leroy at c-s.fr
Wed Oct 24 02:38:28 AEDT 2018
Breno Leitao <leitao at debian.org> a écrit :
> Function huge_ptep_set_access_flags() has the 'extern' keyword in the
> function definition and also in the function declaration. This causes a
> warning in 'sparse' since the 'extern' storage class should be used only on
> symbol declarations.
>
> arch/powerpc/mm/pgtable.c:232:12: warning: function
> 'huge_ptep_set_access_flags' with external linkage has definition
>
> This patch removes the keyword from the definition part, while keeps it in
> the declaration part.
I think checkpatch also says that extern should be avoided in declarations.
Can you remove both ?
Christophe
>
> Signed-off-by: Breno Leitao <leitao at debian.org>
> ---
> arch/powerpc/mm/pgtable.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c
> index d71c7777669c..213933b78077 100644
> --- a/arch/powerpc/mm/pgtable.c
> +++ b/arch/powerpc/mm/pgtable.c
> @@ -229,7 +229,7 @@ int ptep_set_access_flags(struct vm_area_struct
> *vma, unsigned long address,
> }
>
> #ifdef CONFIG_HUGETLB_PAGE
> -extern int huge_ptep_set_access_flags(struct vm_area_struct *vma,
> +int huge_ptep_set_access_flags(struct vm_area_struct *vma,
> unsigned long addr, pte_t *ptep,
> pte_t pte, int dirty)
> {
> --
> 2.19.0
More information about the Linuxppc-dev
mailing list