sh: pgtable: Fix missing prototypes
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 1 Mar 2024 21:02:15 +0000 (22:02 +0100)
committerJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Thu, 2 May 2024 10:01:23 +0000 (12:01 +0200)
arch/sh/mm/pgtable.c:12:6: warning: no previous prototype for 'pgd_ctor' [-Wmissing-prototypes]
arch/sh/mm/pgtable.c:34:8: warning: no previous prototype for 'pgd_alloc' [-Wmissing-prototypes]
arch/sh/mm/pgtable.c:39:6: warning: no previous prototype for 'pgd_free' [-Wmissing-prototypes]
arch/sh/mm/pgtable.c:45:6: warning: no previous prototype for 'pud_populate' [-Wmissing-prototypes]
arch/sh/mm/pgtable.c:50:8: warning: no previous prototype for 'pmd_alloc_one' [-Wmissing-prototypes]
arch/sh/mm/pgtable.c:55:6: warning: no previous prototype for 'pmd_free' [-Wmissing-prototypes]

Make pgd_ctor() static, as it is only used in this file.
Include <asm/pgalloc.h> to fix the other warnings.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Link: https://lore.kernel.org/r/aa1328ea3327d6685aab76d5787cb77c996052c0.1709326528.git.geert+renesas@glider.be
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
arch/sh/mm/pgtable.c

index cf7ce4b5735954bf19e8c0a4a5d25f1a9c76d609..3a4085ea0161fe5655dcaf0d0038d1778420eef5 100644 (file)
@@ -2,12 +2,14 @@
 #include <linux/mm.h>
 #include <linux/slab.h>
 
+#include <asm/pgalloc.h>
+
 static struct kmem_cache *pgd_cachep;
 #if PAGETABLE_LEVELS > 2
 static struct kmem_cache *pmd_cachep;
 #endif
 
-void pgd_ctor(void *x)
+static void pgd_ctor(void *x)
 {
        pgd_t *pgd = x;