From: Mathias Krause <minipli@googlemail.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: linux-pm@vger.kernel.org, Mathias Krause <minipli@googlemail.com>,
Jacob Pan <jacob.jun.pan@linux.intel.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: [PATCH] powercap / RAPL: mark rapl_ids array as __initconst
Date: Wed, 25 Mar 2015 22:15:52 +0100 [thread overview]
Message-ID: <1427318152-21800-1-git-send-email-minipli@googlemail.com> (raw)
The RAPL ids are only tested in rapl_init() which is itself an __init
function. For the MODULE_DEVICE_TABLE() file2alias doesn't care about
the section, just about the symbol name. Therefore it's safe to mark the
rapl_ids[] array as __initconst so its memory can be released after
initialization is done.
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
drivers/powercap/intel_rapl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c
index 63d4033eb683..62f9b322fde0 100644
--- a/drivers/powercap/intel_rapl.c
+++ b/drivers/powercap/intel_rapl.c
@@ -1054,7 +1054,7 @@ static const struct rapl_defaults rapl_defaults_atom = {
.driver_data = (kernel_ulong_t)&_ops, \
}
-static const struct x86_cpu_id rapl_ids[] = {
+static const struct x86_cpu_id rapl_ids[] __initconst = {
RAPL_CPU(0x2a, rapl_defaults_core),/* Sandy Bridge */
RAPL_CPU(0x2d, rapl_defaults_core),/* Sandy Bridge EP */
RAPL_CPU(0x37, rapl_defaults_atom),/* Valleyview */
--
1.7.10.4
next reply other threads:[~2015-03-25 21:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-25 21:15 Mathias Krause [this message]
2015-03-30 19:17 ` [PATCH] powercap / RAPL: mark rapl_ids array as __initconst Rafael J. Wysocki
2015-03-30 22:46 ` Jacob Pan
2015-03-31 5:17 ` Mathias Krause
2015-04-08 18:41 ` Mathias Krause
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=1427318152-21800-1-git-send-email-minipli@googlemail.com \
--to=minipli@googlemail.com \
--cc=jacob.jun.pan@linux.intel.com \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
/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