Skip to contentSkip to conversation

acpi/arm64: Mark next_platform_timer as __init

PATCH In review Kees Cook 2 participants 2 messages Jun 2, 2021 – Jun 3, 2021

Subsystems (2)
lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 acpi/arm64: Mark next_platform_timer as __init

Fix section mismatch warning:

WARNING: modpost: vmlinux.o(.text.unlikely+0x95ac): 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.

---
 drivers/acpi/arm64/gtdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/arm64/gtdt.c +1 -1
index 0a0a982f9c28..c3ad42470a7c 100644
@@ -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;
 
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 20 lines · Kees Cook

Fix section mismatch warning:

WARNING: modpost: vmlinux.o(.text.unlikely+0x95ac): 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.

---
  drivers/acpi/arm64/gtdt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/arm64/gtdt.c +0 -0
index 0a0a982f9c28..c3ad42470a7c 100644

drivers/acpi/arm64/gtdt.c struct acpi_gtdt_descriptor { · line 41

Quoted 7 lines
drivers/acpi/arm64/gtdt.c +1 -1
@@ -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;

Thanks for the fix,