cpufreq: intel_pstate: hide unused intel_pstate_cpu_oob_ids[]
authorArnd Bergmann <arnd@arndb.de>
Wed, 3 Apr 2024 08:06:45 +0000 (10:06 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 3 Apr 2024 14:41:59 +0000 (16:41 +0200)
The reference to this variable is hidden in an #ifdef:

drivers/cpufreq/intel_pstate.c:2440:32: error: 'intel_pstate_cpu_oob_ids' defined but not used [-Werror=unused-const-variable=]

Use the same check around the definition.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/intel_pstate.c

index 02f9e494e86e0f70afd32e155f0f00e5926bd8f3..5f19d3824a4b28a2f69e00952759c5788a00ca52 100644 (file)
@@ -2397,6 +2397,7 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = {
 };
 MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);
 
+#ifdef CONFIG_ACPI
 static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] __initconst = {
        X86_MATCH(BROADWELL_D,          core_funcs),
        X86_MATCH(BROADWELL_X,          core_funcs),
@@ -2405,6 +2406,7 @@ static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] __initconst = {
        X86_MATCH(SAPPHIRERAPIDS_X,     core_funcs),
        {}
 };
+#endif
 
 static const struct x86_cpu_id intel_pstate_cpu_ee_disable_ids[] = {
        X86_MATCH(KABYLAKE,             core_funcs),