Thread (14 messages) flat view 14 messages, 3 authors, 2018-11-27

Re: [PATCH 3/9] powerpc/mm: Remove extern from function definition

From: LEROY Christophe <hidden>
Date: 2018-10-23 15:40:30

Breno Leitao [off-list ref] 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
quoted hunk ↗ jump to hunk
Signed-off-by: Breno Leitao <leitao@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
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help