[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <76cbb7d3-bb91-4900-0275-a9b09fd7c77b@infradead.org>
Date: Mon, 6 May 2019 12:31:25 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
Rob Herring <robh+dt@...nel.org>
Subject: [PATCH -next] x86: olpc: fix section mismatch warning
From: Randy Dunlap <rdunlap@...radead.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@...radead.org>
Cc: x86@...nel.org
Cc: Rob Herring <robh+dt@...nel.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;
Powered by blists - more mailing lists