[PATCH -next] x86: olpc: fix section mismatch warning

From: Randy Dunlap
Date: Mon May 06 2019 - 15:32:14 EST


From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxx>
Cc: x86@xxxxxxxxxx
Cc: Rob Herring <robh+dt@xxxxxxxxxx>
---
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;