* [PATCH] mfd: twl-core: Fix section annotations on {,un}protect_pm_master
@ 2018-10-17 17:13 Nathan Chancellor
2018-10-25 8:02 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2018-10-17 17:13 UTC (permalink / raw)
To: Tony Lindgren, Lee Jones; +Cc: linux-omap, linux-kernel, Nathan Chancellor
When building the kernel with Clang, the following section mismatch
warning appears:
WARNING: vmlinux.o(.text+0x3d84a3b): Section mismatch in reference from
the function twl_probe() to the function
.init.text:unprotect_pm_master()
The function twl_probe() references
the function __init unprotect_pm_master().
This is often because twl_probe lacks a __init
annotation or the annotation of unprotect_pm_master is wrong.
Remove the __init annotation on the *protect_pm_master functions so
there is no more mismatch.
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
Alternatively, I suppose that twl_probe could be marked as __init but
I'm not sure if deferral is possible or not (which I believe would cause
issues but not sure). I went with this more conservative approache but
I'm happy to respin if necessary.
Thanks!
drivers/mfd/twl-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 4be3d239da9e..299016bc46d9 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -979,7 +979,7 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
* letting it generate the right frequencies for USB, MADC, and
* other purposes.
*/
-static inline int __init protect_pm_master(void)
+static inline int protect_pm_master(void)
{
int e = 0;
@@ -988,7 +988,7 @@ static inline int __init protect_pm_master(void)
return e;
}
-static inline int __init unprotect_pm_master(void)
+static inline int unprotect_pm_master(void)
{
int e = 0;
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mfd: twl-core: Fix section annotations on {,un}protect_pm_master
2018-10-17 17:13 [PATCH] mfd: twl-core: Fix section annotations on {,un}protect_pm_master Nathan Chancellor
@ 2018-10-25 8:02 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2018-10-25 8:02 UTC (permalink / raw)
To: Nathan Chancellor; +Cc: Tony Lindgren, linux-omap, linux-kernel
On Wed, 17 Oct 2018, Nathan Chancellor wrote:
> When building the kernel with Clang, the following section mismatch
> warning appears:
>
> WARNING: vmlinux.o(.text+0x3d84a3b): Section mismatch in reference from
> the function twl_probe() to the function
> .init.text:unprotect_pm_master()
> The function twl_probe() references
> the function __init unprotect_pm_master().
> This is often because twl_probe lacks a __init
> annotation or the annotation of unprotect_pm_master is wrong.
>
> Remove the __init annotation on the *protect_pm_master functions so
> there is no more mismatch.
>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>
> Alternatively, I suppose that twl_probe could be marked as __init but
> I'm not sure if deferral is possible or not (which I believe would cause
> issues but not sure). I went with this more conservative approache but
> I'm happy to respin if necessary.
>
> Thanks!
>
> drivers/mfd/twl-core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied for v4.21, thanks.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-25 8:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-17 17:13 [PATCH] mfd: twl-core: Fix section annotations on {,un}protect_pm_master Nathan Chancellor
2018-10-25 8:02 ` Lee Jones
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).