powerpc: Mark probe_machine() __init and static
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 24 Nov 2021 09:32:54 +0000 (20:32 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 29 Nov 2021 11:49:26 +0000 (22:49 +1100)
Prior to commit b1923caa6e64 ("powerpc: Merge 32-bit and 64-bit
setup_arch()") probe_machine() was called from setup_32/64.c and lived
in setup-common.c. But now it's only called from setup-common.c so it
can be static and __init, and we don't need the declaration in
machdep.h either.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211124093254.1054750-6-mpe@ellerman.id.au
arch/powerpc/include/asm/machdep.h
arch/powerpc/kernel/setup-common.c

index 9c3c9f04129ff65c53b25f23132c26a85d0d3ded..e821037f74f05edf3b6ad764701ee69d5c624b71 100644 (file)
@@ -235,8 +235,6 @@ extern struct machdep_calls *machine_id;
                machine_id == &mach_##name; \
        })
 
-extern void probe_machine(void);
-
 #ifdef CONFIG_PPC_PMAC
 /*
  * Power macintoshes have either a CUDA, PMU or SMU controlling
index 4f1322b657603d1c6b37f4916a55198467a3e1e3..f8da937df91845c2290086a0a7f0e190e407df0b 100644 (file)
@@ -582,7 +582,7 @@ static __init int add_pcspkr(void)
 device_initcall(add_pcspkr);
 #endif /* CONFIG_PCSPKR_PLATFORM */
 
-void probe_machine(void)
+static __init void probe_machine(void)
 {
        extern struct machdep_calls __machine_desc_start;
        extern struct machdep_calls __machine_desc_end;