All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] x86: olpc: fix section mismatch warning
@ 2019-05-06 19:31 Randy Dunlap
  2019-05-06 21:06 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2019-05-06 19:31 UTC (permalink / raw)
  To: LKML, X86 ML, Rob Herring

From: Randy Dunlap <rdunlap@infradead.org>

Fix section mismatch warning:

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

All calls to olpc_dt_compatible_match() are from __init functions,
so it can be marked __init also.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: x86@kernel.org
Cc: Rob Herring <robh+dt@kernel.org>
---
 arch/x86/platform/olpc/olpc_dt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20190506.orig/arch/x86/platform/olpc/olpc_dt.c
+++ linux-next-20190506/arch/x86/platform/olpc/olpc_dt.c
@@ -220,7 +220,7 @@ static u32 __init olpc_dt_get_board_revi
 	return be32_to_cpu(rev);
 }
 
-int olpc_dt_compatible_match(phandle node, const char *compat)
+int __init olpc_dt_compatible_match(phandle node, const char *compat)
 {
 	char buf[64], *p;
 	int plen, len;



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] x86: olpc: fix section mismatch warning
  2019-05-06 19:31 [PATCH -next] x86: olpc: fix section mismatch warning Randy Dunlap
@ 2019-05-06 21:06 ` Rob Herring
  2019-05-07  7:50   ` Lubomir Rintel
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2019-05-06 21:06 UTC (permalink / raw)
  To: Randy Dunlap, Lubomir Rintel; +Cc: LKML, X86 ML

+Lubomir

On Mon, May 6, 2019 at 2:31 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Fix section mismatch warning:
>
> WARNING: vmlinux.o(.text+0x36e00): Section mismatch in reference from the function olpc_dt_compatible_match() to the function .init.text:olpc_dt_getproperty()
> The function olpc_dt_compatible_match() references
> the function __init olpc_dt_getproperty().
> This is often because olpc_dt_compatible_match lacks a __init
> annotation or the annotation of olpc_dt_getproperty is wrong.
>
> All calls to olpc_dt_compatible_match() are from __init functions,
> so it can be marked __init also.
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: x86@kernel.org
> Cc: Rob Herring <robh+dt@kernel.org>

Fixes: a7a9bacb9a32 ("x86/platform/olpc: Use a correct version when
making up a battery node")
Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] x86: olpc: fix section mismatch warning
  2019-05-06 21:06 ` Rob Herring
@ 2019-05-07  7:50   ` Lubomir Rintel
  0 siblings, 0 replies; 3+ messages in thread
From: Lubomir Rintel @ 2019-05-07  7:50 UTC (permalink / raw)
  To: Rob Herring, Randy Dunlap; +Cc: LKML, X86 ML

On Mon, 2019-05-06 at 16:06 -0500, Rob Herring wrote:
> +Lubomir
> 
> On Mon, May 6, 2019 at 2:31 PM Randy Dunlap <rdunlap@infradead.org> wrote:
> > From: Randy Dunlap <rdunlap@infradead.org>
> > 
> > Fix section mismatch warning:
> > 
> > WARNING: vmlinux.o(.text+0x36e00): Section mismatch in reference from the function olpc_dt_compatible_match() to the function .init.text:olpc_dt_getproperty()
> > The function olpc_dt_compatible_match() references
> > the function __init olpc_dt_getproperty().
> > This is often because olpc_dt_compatible_match lacks a __init
> > annotation or the annotation of olpc_dt_getproperty is wrong.
> > 
> > All calls to olpc_dt_compatible_match() are from __init functions,
> > so it can be marked __init also.
> > 
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> > Cc: x86@kernel.org
> > Cc: Rob Herring <robh+dt@kernel.org>
> 
> Fixes: a7a9bacb9a32 ("x86/platform/olpc: Use a correct version when
> making up a battery node")
> Acked-by: Rob Herring <robh@kernel.org>

Thanks for this. Which tree does this apply to? I can't see the patch
that introduce the problem in x86's for-next? I've a mostly equivalent
patch lined up with an intent to send it over to x86 once the faulty
commit reaches it:

https://lists.01.org/pipermail/kbuild-all/2019-April/060269.html

In any case;

Reviewed-by: Lubomir Rintel <lkundrak@v3.sk>

> -int olpc_dt_compatible_match(phandle node, const char *compat)
> +int __init olpc_dt_compatible_match(phandle node, const char *compat)

My patch also marks olpc_dt_compatible_match() static. It should still
be done if this one ends up being applied.

Lubo


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-07  7:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-06 19:31 [PATCH -next] x86: olpc: fix section mismatch warning Randy Dunlap
2019-05-06 21:06 ` Rob Herring
2019-05-07  7:50   ` Lubomir Rintel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.