Skip to content

Commit 59b2c5b

Browse files
Qian Cairafaeljw
authored andcommitted
ACPI: NUMA: HMAT: fix a section mismatch
Commit cf8741a ("ACPI: NUMA: HMAT: Register "soft reserved" memory as an "hmem" device") introduced a linker warning, WARNING: vmlinux.o(.text+0x64ec3c): Section mismatch in reference from the function hmat_register_target() to the function .init.text:hmat_register_target_devices() The function hmat_register_target() references the function __init hmat_register_target_devices(). Since hmat_register_target() is also called from hmat_callback(), and then register_hotmemory_notifier(), where it should not be freed when hmat_init() is done, it indicates that the __init annotation of hmat_register_target_devices() is incorrect. Fixes: cf8741a ("ACPI: NUMA: HMAT: Register "soft reserved" memory as an "hmem" device") Signed-off-by: Qian Cai <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 4caa525 commit 59b2c5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/numa/hmat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ static void hmat_register_target_device(struct memory_target *target,
694694
memregion_free(id);
695695
}
696696

697-
static __init void hmat_register_target_devices(struct memory_target *target)
697+
static void hmat_register_target_devices(struct memory_target *target)
698698
{
699699
struct resource *res;
700700

0 commit comments

Comments
 (0)