Skip to content

Commit f4670a1

Browse files
nathanchancetsbogend
authored andcommitted
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 ac7c3e4 ("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>
1 parent 95b5baf commit f4670a1

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

arch/mips/include/asm/bugs.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ extern void check_bugs64_early(void);
2424
extern void check_bugs32(void);
2525
extern void check_bugs64(void);
2626

27-
static inline void check_bugs_early(void)
28-
{
29-
if (IS_ENABLED(CONFIG_CPU_R4X00_BUGS64))
30-
check_bugs64_early();
31-
}
32-
3327
static inline void __init check_bugs(void)
3428
{
3529
unsigned int cpu = smp_processor_id();

arch/mips/kernel/setup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,8 @@ void __init setup_arch(char **cmdline_p)
786786
setup_early_printk();
787787
#endif
788788
cpu_report();
789-
check_bugs_early();
789+
if (IS_ENABLED(CONFIG_CPU_R4X00_BUGS64))
790+
check_bugs64_early();
790791

791792
#if defined(CONFIG_VT)
792793
#if defined(CONFIG_VGA_CONSOLE)

0 commit comments

Comments
 (0)