From: Qian Cai <cai@lca.pw>
To: rafael.j.wysocki@intel.com
Cc: dave.hansen@linux.intel.com, dan.j.williams@intel.com,
tglx@linutronix.de, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org, Qian Cai <cai@lca.pw>
Subject: [PATCH -next] acpi/numa/hmat: fix a section mismatch
Date: Mon, 11 Nov 2019 16:34:26 -0500 [thread overview]
Message-ID: <20191111213426.1415-1-cai@lca.pw> (raw)
The 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().
This is often because hmat_register_target lacks a __init
annotation or the annotation of hmat_register_target_devices is wrong.
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 the 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>
---
drivers/acpi/numa/hmat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 @@ 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;
--
2.21.0 (Apple Git-122.2)
next reply other threads:[~2019-11-11 21:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-11 21:34 Qian Cai [this message]
2019-11-12 9:01 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191111213426.1415-1-cai@lca.pw \
--to=cai@lca.pw \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®