Skip to content

Commit

Permalink
ACPI: NUMA: HMAT: fix a section mismatch
Browse files Browse the repository at this point in the history
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 <cai@lca.pw>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Qian Cai authored and Rafael J. Wysocki committed Nov 12, 2019
1 parent 4caa525 commit 59b2c5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/numa/hmat.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ static void hmat_register_target_device(struct memory_target *target,
memregion_free(id);
}

static __init void hmat_register_target_devices(struct memory_target *target)
static void hmat_register_target_devices(struct memory_target *target)
{
struct resource *res;

Expand Down

0 comments on commit 59b2c5b

Please sign in to comment.