Re: [PATCH] acpi/arm64: fix next_platform_timer() section mismatch error

From
Hanjun Guo <guohanjun@huawei.com>
Date
2021-08-23 13:33:45
Reply to
Jackie Liu, 2021-08-23
On 2021/8/23 17:25, Jackie Liu wrote:
quoted hunk ↗ jump to hunk
From: Jackie Liu <redacted>

Fix modpost Section mismatch error in next_platform_timer().

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

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

   ERROR: modpost: Section mismatches detected.
   Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.
   make[1]: *** [scripts/Makefile.modpost:59: vmlinux.symvers] Error 1
   make[1]: *** Deleting file 'vmlinux.symvers'
   make: *** [Makefile:1176: vmlinux] Error 2
   [...]

Fixes: a712c3ed9b8a ("acpi/arm64: Add memory-mapped timer support in GTDT driver")
Signed-off-by: Jackie Liu <redacted>
---
  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..c0e77c1c8e09 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 inline __init void *next_platform_timer(void *platform_timer)
  {
  	struct acpi_gtdt_header *gh = platform_timer;
Looks good to me,

Acked-by: Hanjun Guo <guohanjun@huawei.com>

Thanks
Hanjun
Thread (5 messages) 5 messages, 3 authors, last reply 2021-10-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help