Re: [PATCH 13/23] powerpc/mm: Move hpte_insert_repeating() prototype

From
Christophe Leroy <hidden>
Date
2020-12-21 08:34:13
Reply to
Cédric Le Goater, 2020-12-21

Le 21/12/2020 à 08:42, Cédric Le Goater a écrit :
quoted hunk ↗ jump to hunk
It fixes this W=1 compile error :

../arch/powerpc/mm/book3s64/hash_utils.c:1867:6: error: no previous prototype for ‘hpte_insert_repeating’ [-Werror=missing-prototypes]
  1867 | long hpte_insert_repeating(unsigned long hash, unsigned long vpn,
       |      ^~~~~~~~~~~~~~~~~~~~~

Cc: "Aneesh Kumar K.V" <redacted>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
  arch/powerpc/include/asm/book3s/64/mmu-hash.h | 5 +++++
  arch/powerpc/mm/book3s64/hash_hugetlbpage.c   | 4 ----
  2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/include/asm/book3s/64/mmu-hash.h b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
index a94fd4e0c182..76ff95950309 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu-hash.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
@@ -454,6 +454,11 @@ static inline unsigned long hpt_hash(unsigned long vpn,
  #define HPTE_NOHPTE_UPDATE	0x2
  #define HPTE_USE_KERNEL_KEY	0x4
  
+extern long hpte_insert_repeating(unsigned long hash, unsigned long vpn,
+				  unsigned long pa, unsigned long rlags,
+				  unsigned long vflags, int psize, int ssize);
+
+
Don't copy the 'extern' keyword. It is useless for function prototypes.

Then you could probably fit on only two lines (nowadays 100 chars are allowed per line)

quoted hunk ↗ jump to hunk
  extern int __hash_page_4K(unsigned long ea, unsigned long access,
  			  unsigned long vsid, pte_t *ptep, unsigned long trap,
  			  unsigned long flags, int ssize, int subpage_prot);
diff --git a/arch/powerpc/mm/book3s64/hash_hugetlbpage.c b/arch/powerpc/mm/book3s64/hash_hugetlbpage.c
index b5e9fff8c217..a688e1324ae5 100644
--- a/arch/powerpc/mm/book3s64/hash_hugetlbpage.c
+++ b/arch/powerpc/mm/book3s64/hash_hugetlbpage.c
@@ -16,10 +16,6 @@
  unsigned int hpage_shift;
  EXPORT_SYMBOL(hpage_shift);
  
-extern long hpte_insert_repeating(unsigned long hash, unsigned long vpn,
-				  unsigned long pa, unsigned long rlags,
-				  unsigned long vflags, int psize, int ssize);
-
  int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid,
  		     pte_t *ptep, unsigned long trap, unsigned long flags,
  		     int ssize, unsigned int shift, unsigned int mmu_psize)
Thread (33 messages) 33 messages, 2 authors, 2021-01-04
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help