From: Arnd Bergmann <arnd@kernel.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Len Brown <lenb@kernel.org>,
Manyi Li <limanyi@uniontech.com>, Juergen Gross <jgross@suse.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Simon Gaiser <simon@invisiblethingslab.com>,
Kai-Heng Feng <kai.heng.feng@canonical.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ACPI: s2idle: fix section mismatch warning
Date: Thu, 1 Jun 2023 23:33:15 +0200 [thread overview]
Message-ID: <20230601213319.3304080-1-arnd@kernel.org> (raw)
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
next reply other threads:[~2023-06-01 21:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-01 21:33 Arnd Bergmann [this message]
2023-06-05 17:16 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230601213319.3304080-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=dave.hansen@linux.intel.com \
--cc=jgross@suse.com \
--cc=kai.heng.feng@canonical.com \
--cc=lenb@kernel.org \
--cc=limanyi@uniontech.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=simon@invisiblethingslab.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®