[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200715082634.3024816-10-lee.jones@linaro.org>
Date: Wed, 15 Jul 2020 09:26:30 +0100
From: Lee Jones <lee.jones@...aro.org>
To: rjw@...ysocki.net, viresh.kumar@...aro.org
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, Lee Jones <lee.jones@...aro.org>,
Andy Grover <andrew.grover@...el.com>,
Paul Diefenbaugh <paul.s.diefenbaugh@...el.com>,
Dominik Brodowski <linux@...do.de>,
Denis Sadykov <denis.m.sadykov@...el.com>
Subject: [PATCH v2 09/13] cpufreq: acpi-cpufreq: Mark sometimes used ID structs as __maybe_unused
Not used when MODULE is not defined.
Fixes the following W=1 kernel build warning(s):
drivers/cpufreq/acpi-cpufreq.c:1004:36: warning: ‘processor_device_ids’ defined but not used [-Wunused-const-variable=]
997 | static const struct x86_cpu_id acpi_cpufreq_ids[] = {
| ^~~~~~~~~~~~~~~~
drivers/cpufreq/acpi-cpufreq.c:997:32: warning: ‘acpi_cpufreq_ids’ defined but not used [-Wunused-const-variable=]
619 | static const struct acpi_device_id processor_device_ids[] = {
| ^~~~~~~~~~~~~~~~~~~~
Cc: Andy Grover <andrew.grover@...el.com>
Cc: Paul Diefenbaugh <paul.s.diefenbaugh@...el.com>
Cc: Dominik Brodowski <linux@...do.de>
Cc: Denis Sadykov <denis.m.sadykov@...el.com>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
drivers/cpufreq/acpi-cpufreq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 6b3d8355c8dea..65bdedcc7f142 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -993,14 +993,14 @@ MODULE_PARM_DESC(acpi_pstate_strict,
late_initcall(acpi_cpufreq_init);
module_exit(acpi_cpufreq_exit);
-static const struct x86_cpu_id acpi_cpufreq_ids[] = {
+static const struct x86_cpu_id __maybe_unused acpi_cpufreq_ids[] = {
X86_MATCH_FEATURE(X86_FEATURE_ACPI, NULL),
X86_MATCH_FEATURE(X86_FEATURE_HW_PSTATE, NULL),
{}
};
MODULE_DEVICE_TABLE(x86cpu, acpi_cpufreq_ids);
-static const struct acpi_device_id processor_device_ids[] = {
+static const struct acpi_device_id __maybe_unused processor_device_ids[] = {
{ACPI_PROCESSOR_OBJECT_HID, },
{ACPI_PROCESSOR_DEVICE_HID, },
{},
--
2.25.1
Powered by blists - more mailing lists