[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210927141921.1760209-1-arnd@kernel.org>
Date: Mon, 27 Sep 2021 16:19:14 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Hanjun Guo <guohanjun@...wei.com>,
Sudeep Holla <sudeep.holla@....com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>,
Catalin Marinas <catalin.marinas@....com>,
Marc Zyngier <maz@...nel.org>, linux-acpi@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] acpi: arm64: fix section mismatch warning
From: Arnd Bergmann <arnd@...db.de>
In a gcc-11 randconfig build I came across this warning:
WARNING: modpost: vmlinux.o(.text.unlikely+0x2c084): Section mismatch in reference from the function next_platform_timer() to the variable .init.data:acpi_gtdt_desc
The function next_platform_timer() references
the variable __initdata acpi_gtdt_desc.
This is often because next_platform_timer lacks a __initdata
annotation or the annotation of acpi_gtdt_desc is wrong.
This happens when next_platform_timer() fails to get inlined
despite the inline annotation. Adding '__init' solves the issue,
and it seems best to remove the 'inline' in the process seems
better anyway.
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/acpi/arm64/gtdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/arm64/gtdt.c b/drivers/acpi/arm64/gtdt.c
index 0a0a982f9c28..c3ad42470a7c 100644
--- a/drivers/acpi/arm64/gtdt.c
+++ b/drivers/acpi/arm64/gtdt.c
@@ -36,7 +36,7 @@ struct acpi_gtdt_descriptor {
static struct acpi_gtdt_descriptor acpi_gtdt_desc __initdata;
-static inline void *next_platform_timer(void *platform_timer)
+static __init void *next_platform_timer(void *platform_timer)
{
struct acpi_gtdt_header *gh = platform_timer;
--
2.29.2
Powered by blists - more mailing lists