OSDN Git Service

MIPS: Loongson64: Fix section mismatch warning
authorTiezhu Yang <yangtiezhu@loongson.cn>
Mon, 27 Jun 2022 07:07:13 +0000 (15:07 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Tue, 5 Jul 2022 09:20:52 +0000 (11:20 +0200)
commit08472f6ebdc23334ad11dcd761d2d52c32897793
treec0d0495d64f6239f602a94cfeb31ae957d4a52d7
parent7a9f743ceead60ed454c46fbc3085ee9a79cbebb
MIPS: Loongson64: Fix section mismatch warning

prom_init_numa_memory() is annotated __init and not used by any module,
thus don't export it.

Remove not needed EXPORT_SYMBOL for prom_init_numa_memory() to fix the
following section mismatch warning:

  LD      vmlinux.o
  MODPOST vmlinux.symvers
WARNING: modpost: vmlinux.o(___ksymtab+prom_init_numa_memory+0x0): Section mismatch in reference
from the variable __ksymtab_prom_init_numa_memory to the function .init.text:prom_init_numa_memory()
The symbol prom_init_numa_memory is exported and annotated __init
Fix this by removing the __init annotation of prom_init_numa_memory or drop the export.

This is build on Linux 5.19-rc4.

Fixes: 6fbde6b492df ("MIPS: Loongson64: Move files to the top-level directory")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Reviewed-by: Huacai Chen <chenhuacai@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/loongson64/numa.c