* [PATCH v2] powerpc/mm: Remove extern from function definition
@ 2018-10-31 14:24 Breno Leitao
2018-11-27 9:22 ` [v2] " Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Breno Leitao @ 2018-10-31 14:24 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Breno Leitao
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 not be used
in the function definition.
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. It also removes
the extern keyword from the declaration part, since checkpatch --strict
complains about it.
Suggested-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Breno Leitao <leitao@debian.org>
---
arch/powerpc/include/asm/hugetlb.h | 6 +++---
arch/powerpc/mm/pgtable.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h
index 383da1ab9e23..98004262bc87 100644
--- a/arch/powerpc/include/asm/hugetlb.h
+++ b/arch/powerpc/include/asm/hugetlb.h
@@ -135,9 +135,9 @@ static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
}
#define __HAVE_ARCH_HUGE_PTEP_SET_ACCESS_FLAGS
-extern int huge_ptep_set_access_flags(struct vm_area_struct *vma,
- unsigned long addr, pte_t *ptep,
- pte_t pte, int dirty);
+int huge_ptep_set_access_flags(struct vm_area_struct *vma,
+ unsigned long addr, pte_t *ptep,
+ pte_t pte, int dirty);
static inline void arch_clear_hugepage_flags(struct page *page)
{
diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c
index 010e1c616cb2..1e33dccbd176 100644
--- a/arch/powerpc/mm/pgtable.c
+++ b/arch/powerpc/mm/pgtable.c
@@ -221,9 +221,9 @@ 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,
- unsigned long addr, pte_t *ptep,
- pte_t pte, int dirty)
+int huge_ptep_set_access_flags(struct vm_area_struct *vma,
+ unsigned long addr, pte_t *ptep,
+ pte_t pte, int dirty)
{
#ifdef HUGETLB_NEED_PRELOAD
/*
--
2.13.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [v2] powerpc/mm: Remove extern from function definition
2018-10-31 14:24 [PATCH v2] powerpc/mm: Remove extern from function definition Breno Leitao
@ 2018-11-27 9:22 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2018-11-27 9:22 UTC (permalink / raw)
To: Breno Leitao, linuxppc-dev; +Cc: Breno Leitao
On Wed, 2018-10-31 at 14:24:11 UTC, Breno Leitao wrote:
> 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 not be used
> in the function definition.
>
> 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. It also removes
> the extern keyword from the declaration part, since checkpatch --strict
> complains about it.
>
> Suggested-by: Christophe Leroy <christophe.leroy@c-s.fr>
> Signed-off-by: Breno Leitao <leitao@debian.org>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/bce85a167b336da80642952b222588
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-27 9:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-31 14:24 [PATCH v2] powerpc/mm: Remove extern from function definition Breno Leitao
2018-11-27 9:22 ` [v2] " Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).