lkml.org 
[lkml]   [2023]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ACPI: s2idle: fix section mismatch warning
Date
From: Arnd Bergmann <arnd@arndb.de>

The acpi_sleep_suspend_setup() function is missing an __init annotation,
which causes a warning in rare configurations that end up not inlining
it into its caller:

WARNING: modpost: vmlinux.o: section mismatch in reference: acpi_sleep_suspend_setup (section: .text) -> acpi_s2idle_setup (section: .init.text)

It's only called from an __init function, so adding the annotation is
correct here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/acpi/sleep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 72470b9f16c45..552adc04743b5 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -840,7 +840,7 @@ void __weak acpi_s2idle_setup(void)
s2idle_set_ops(&acpi_s2idle_ops);
}

-static void acpi_sleep_suspend_setup(void)
+static void __init acpi_sleep_suspend_setup(void)
{
bool suspend_ops_needed = false;
int i;
--
2.39.2
\
 
 \ /
  Last update: 2023-06-01 23:34    [W:0.049 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site