summaryrefslogtreecommitdiff
path: root/drivers/acpi/numa
diff options
context:
space:
mode:
authorQian Cai <cai@lca.pw>2019-11-12 00:34:26 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-11-12 12:01:03 +0300
commit59b2c5b63587a9ed2292ccce32fd69d8de815036 (patch)
treead19656a58d9d9f121e717f6832a3f57931e2e6d /drivers/acpi/numa
parent4caa525b783b0abe7bc06e41220b337ba311bbf7 (diff)
downloadlinux-59b2c5b63587a9ed2292ccce32fd69d8de815036.tar.xz
ACPI: NUMA: HMAT: fix a section mismatch
Commit cf8741ac57ed ("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: cf8741ac57ed ("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>
Diffstat (limited to 'drivers/acpi/numa')
-rw-r--r--drivers/acpi/numa/hmat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c
index 42cafeaac336..600ae3babd15 100644
--- a/drivers/acpi/numa/hmat.c
+++ b/drivers/acpi/numa/hmat.c
@@ -694,7 +694,7 @@ out_pdev:
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;