]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/prom: Mark identical_pvr_fixup as __init
authorNathan Chancellor <nathan@kernel.org>
Tue, 2 Mar 2021 20:08:29 +0000 (13:08 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 24 Mar 2021 03:09:30 +0000 (14:09 +1100)
commita050b93abecebc1dd2e0516eb1818ba352f0b05e
tree3bd11389a5a8f48e8ac92639da31d51736d9c1dd
parente08b363072bc80d6d5c8e5f2984a6c44ad3e1994
powerpc/prom: Mark identical_pvr_fixup as __init

If identical_pvr_fixup() is not inlined, there are two modpost warnings:

WARNING: modpost: vmlinux.o(.text+0x54e8): Section mismatch in reference
from the function identical_pvr_fixup() to the function
.init.text:of_get_flat_dt_prop()
The function identical_pvr_fixup() references
the function __init of_get_flat_dt_prop().
This is often because identical_pvr_fixup lacks a __init
annotation or the annotation of of_get_flat_dt_prop is wrong.

WARNING: modpost: vmlinux.o(.text+0x551c): Section mismatch in reference
from the function identical_pvr_fixup() to the function
.init.text:identify_cpu()
The function identical_pvr_fixup() references
the function __init identify_cpu().
This is often because identical_pvr_fixup lacks a __init
annotation or the annotation of identify_cpu is wrong.

identical_pvr_fixup() calls two functions marked as __init and is only
called by a function marked as __init so it should be marked as __init
as well. At the same time, remove the inline keywork as it is not
necessary to inline this function. The compiler is still free to do so
if it feels it is worthwhile since commit d8f65d58e6b5 ("compiler:
remove CONFIG_OPTIMIZE_INLINING entirely").

Fixes: d0e3a4db4767 ("[POWERPC] 4xx: update 440EP(x)/440GR(x) identical PVR issue workaround")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://github.com/ClangBuiltLinux/linux/issues/1316
Link: https://lore.kernel.org/r/20210302200829.2680663-1-nathan@kernel.org
arch/powerpc/kernel/prom.c