diff options
author | Nathan Chancellor <nathan@kernel.org> | 2023-04-21 18:11:27 +0200 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2023-04-22 23:29:00 +0200 |
commit | f4670a1b30f886e843258ca4a69c442811a90302 (patch) | |
tree | 78801ffc425f7733000a012ea68dd7037bac9100 /arch/mips/kernel/setup.c | |
parent | MIPS: Mark check_bugs() as __init (diff) | |
download | linux-f4670a1b30f886e843258ca4a69c442811a90302.tar.xz linux-f4670a1b30f886e843258ca4a69c442811a90302.zip |
MIPS: Sink body of check_bugs_early() into its only call site
If check_bugs_early() is not inlined, which a compiler is free to do
after commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING
forcibly"), modpost would warn that check_bugs_early(), a non-init
function, refers to check_bugs64_early(), which is marked __init. This
would not result in any run time issues, as check_bugs_early() is only
called from setup_arch(), which is marked __init.
To avoid this potential warning, just sink the body of
check_bugs_early() into its single call site in setup_arch().
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/kernel/setup.c')
-rw-r--r-- | arch/mips/kernel/setup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index f1c88f8a1dc5..febdc5564638 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -786,7 +786,8 @@ void __init setup_arch(char **cmdline_p) setup_early_printk(); #endif cpu_report(); - check_bugs_early(); + if (IS_ENABLED(CONFIG_CPU_R4X00_BUGS64)) + check_bugs64_early(); #if defined(CONFIG_VT) #if defined(CONFIG_VGA_CONSOLE) |