hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/cpufreq/speedstep-ich.c
....@@ -1,8 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * (C) 2001 Dave Jones, Arjan van de ven.
34 * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de>
45 *
5
- * Licensed under the terms of the GNU GPL License version 2.
66 * Based upon reverse engineered information, and on Intel documentation
77 * for chipsets ICH2-M and ICH3-M.
88 *
....@@ -243,8 +243,7 @@
243243 unsigned int speed;
244244
245245 /* You're supposed to ensure CPU is online. */
246
- if (smp_call_function_single(cpu, get_freq_data, &speed, 1) != 0)
247
- BUG();
246
+ BUG_ON(smp_call_function_single(cpu, get_freq_data, &speed, 1));
248247
249248 pr_debug("detected %u kHz as current frequency\n", speed);
250249 return speed;
....@@ -320,15 +319,11 @@
320319 };
321320
322321 static const struct x86_cpu_id ss_smi_ids[] = {
323
- { X86_VENDOR_INTEL, 6, 0xb, },
324
- { X86_VENDOR_INTEL, 6, 0x8, },
325
- { X86_VENDOR_INTEL, 15, 2 },
322
+ X86_MATCH_VENDOR_FAM_MODEL(INTEL, 6, 0x8, 0),
323
+ X86_MATCH_VENDOR_FAM_MODEL(INTEL, 6, 0xb, 0),
324
+ X86_MATCH_VENDOR_FAM_MODEL(INTEL, 15, 0x2, 0),
326325 {}
327326 };
328
-#if 0
329
-/* Autoload or not? Do not for now. */
330
-MODULE_DEVICE_TABLE(x86cpu, ss_smi_ids);
331
-#endif
332327
333328 /**
334329 * speedstep_init - initializes the SpeedStep CPUFreq driver