Messages in this thread Patch in this message | | | From | Randy Dunlap <> | Subject | [PATCH -next] x86: olpc: fix section mismatch warning | Date | Mon, 6 May 2019 12:31:25 -0700 |
| |
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;
| |