mips: mark local function static if possible
authorArnd Bergmann <arnd@arndb.de>
Mon, 4 Dec 2023 11:56:56 +0000 (12:56 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 11 Dec 2023 01:21:39 +0000 (17:21 -0800)
These two functions are global but have no extern prototypes or other
callers, so it's best to mark them as static, avoiding these warnings:

arch/mips/kernel/mips-cm.c:204:13: error: no previous prototype for '__mips_cm_l2sync_phys_base' [-Werror=missing-prototypes]
arch/mips/mm/c-r4k.c:1827:12: error: no previous prototype for 'r4k_cache_init_pm' [-Werror=missing-prototypes]

Link: https://lkml.kernel.org/r/20231204115710.2247097-7-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Stephen Rothwell <sfr@rothwell.id.au>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/mips/kernel/mips-cm.c
arch/mips/mm/c-r4k.c

index 3f00788b08718da7b99b97006a8edf81eb360508..84b3affb9de88a8e1741286b39f12c70b87636fd 100644 (file)
@@ -201,7 +201,7 @@ phys_addr_t __mips_cm_phys_base(void)
 phys_addr_t mips_cm_phys_base(void)
        __attribute__((weak, alias("__mips_cm_phys_base")));
 
-phys_addr_t __mips_cm_l2sync_phys_base(void)
+static phys_addr_t __mips_cm_l2sync_phys_base(void)
 {
        u32 base_reg;
 
index 187d1c16361cfa926e1d5cd394d7ed6fb1491167..0619e5296ff3fa2adeacca541eac9fca495a388a 100644 (file)
@@ -1828,7 +1828,7 @@ static struct notifier_block r4k_cache_pm_notifier_block = {
        .notifier_call = r4k_cache_pm_notifier,
 };
 
-int __init r4k_cache_init_pm(void)
+static int __init r4k_cache_init_pm(void)
 {
        return cpu_pm_register_notifier(&r4k_cache_pm_notifier_block);
 }