mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ACPI: s2idle: fix section mismatch warning
@ 2023-06-01 21:33 Arnd Bergmann
  2023-06-05 17:16 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-06-01 21:33 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Arnd Bergmann, Len Brown, Manyi Li, Juergen Gross, Dave Hansen,
	Simon Gaiser, Kai-Heng Feng, linux-acpi, linux-kernel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ACPI: s2idle: fix section mismatch warning
  2023-06-01 21:33 [PATCH] ACPI: s2idle: fix section mismatch warning Arnd Bergmann
@ 2023-06-05 17:16 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2023-06-05 17:16 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Rafael J. Wysocki, Arnd Bergmann, Len Brown, Manyi Li,
	Juergen Gross, Dave Hansen, Simon Gaiser, Kai-Heng Feng,
	linux-acpi, linux-kernel

On Thu, Jun 1, 2023 at 11:33 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> 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;
> --

Applied as 6.5 material, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-05 17:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-01 21:33 [PATCH] ACPI: s2idle: fix section mismatch warning Arnd Bergmann
2023-06-05 17:16 ` Rafael J. Wysocki

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®