* [PATCH] ARM: OMAP2+: hwmod: Fix some section annotations
@ 2018-10-18 0:52 Nathan Chancellor
2018-11-19 18:00 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2018-10-18 0:52 UTC (permalink / raw)
To: Benoît Cousson, Paul Walmsley, Tony Lindgren
Cc: Russell King, linux-omap, linux-arm-kernel, linux-kernel,
Nathan Chancellor
When building the kernel with Clang, the following section mismatch
warnings appears:
WARNING: vmlinux.o(.text+0x2d398): Section mismatch in reference from
the function _setup() to the function .init.text:_setup_iclk_autoidle()
The function _setup() references
the function __init _setup_iclk_autoidle().
This is often because _setup lacks a __init
annotation or the annotation of _setup_iclk_autoidle is wrong.
WARNING: vmlinux.o(.text+0x2d3a0): Section mismatch in reference from
the function _setup() to the function .init.text:_setup_reset()
The function _setup() references
the function __init _setup_reset().
This is often because _setup lacks a __init
annotation or the annotation of _setup_reset is wrong.
WARNING: vmlinux.o(.text+0x2d408): Section mismatch in reference from
the function _setup() to the function .init.text:_setup_postsetup()
The function _setup() references
the function __init _setup_postsetup().
This is often because _setup lacks a __init
annotation or the annotation of _setup_postsetup is wrong.
_setup is used in omap_hwmod_allocate_module, which isn't marked __init
and looks like it shouldn't be, meaning to fix these warnings, those
functions must be moved out of the init section, which this patch does.
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
arch/arm/mach-omap2/omap_hwmod.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 083dcd9942ce..921c9aaee63f 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2413,7 +2413,7 @@ static int __init _init(struct omap_hwmod *oh, void *data)
* a stub; implementing this properly requires iclk autoidle usecounting in
* the clock code. No return value.
*/
-static void __init _setup_iclk_autoidle(struct omap_hwmod *oh)
+static void _setup_iclk_autoidle(struct omap_hwmod *oh)
{
struct omap_hwmod_ocp_if *os;
@@ -2444,7 +2444,7 @@ static void __init _setup_iclk_autoidle(struct omap_hwmod *oh)
* reset. Returns 0 upon success or a negative error code upon
* failure.
*/
-static int __init _setup_reset(struct omap_hwmod *oh)
+static int _setup_reset(struct omap_hwmod *oh)
{
int r;
@@ -2505,7 +2505,7 @@ static int __init _setup_reset(struct omap_hwmod *oh)
*
* No return value.
*/
-static void __init _setup_postsetup(struct omap_hwmod *oh)
+static void _setup_postsetup(struct omap_hwmod *oh)
{
u8 postsetup_state;
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: OMAP2+: hwmod: Fix some section annotations
2018-10-18 0:52 [PATCH] ARM: OMAP2+: hwmod: Fix some section annotations Nathan Chancellor
@ 2018-11-19 18:00 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2018-11-19 18:00 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Benoît Cousson, Paul Walmsley, Russell King, linux-omap,
linux-arm-kernel, linux-kernel
* Nathan Chancellor <natechancellor@gmail.com> [181017 17:52]:
> When building the kernel with Clang, the following section mismatch
> warnings appears:
>
> WARNING: vmlinux.o(.text+0x2d398): Section mismatch in reference from
> the function _setup() to the function .init.text:_setup_iclk_autoidle()
> The function _setup() references
> the function __init _setup_iclk_autoidle().
> This is often because _setup lacks a __init
> annotation or the annotation of _setup_iclk_autoidle is wrong.
...
Applying into omap-for-v4.21/soc thanks.
Tony
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-19 18:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18 0:52 [PATCH] ARM: OMAP2+: hwmod: Fix some section annotations Nathan Chancellor
2018-11-19 18:00 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).