[Unstable][PATCH] UBUNTU: SAUCE: Revert "UBUNTU: SAUCE: (no-up) Allow filtering of cpufreq drivers"
Juerg Haefliger
juerg.haefliger at canonical.com
Wed Nov 27 15:44:29 UTC 2024
BugLink: https://bugs.launchpad.net/bugs/2089676
This is ancient and likely no longer needed. And it introduced a compile
warning.
drivers/cpufreq/cpufreq.c: In function ‘cpufreq_register_driver’:
drivers/cpufreq/cpufreq.c:2912:21: warning: the comparison will always evaluate as ‘true’ for the address of ‘name’ will never be NULL [-Waddress]
2912 | if (!driver_data->name ||
| ^
In file included from /<<PKGBUILDDIR>>/drivers/cpufreq/cpufreq.c:18:
include/linux/cpufreq.h:326:25: note: ‘name’ declared here
326 | char name[CPUFREQ_NAME_LEN];
| ^~~~
Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
---
.../admin-guide/kernel-parameters.txt | 4 ----
drivers/cpufreq/cpufreq.c | 22 +------------------
2 files changed, 1 insertion(+), 25 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 9d205cd0d0f1..3246cfff44fe 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -891,10 +891,6 @@
Format:
<first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>]
- cpufreq_driver= [X86] Allow only the named cpu frequency scaling driver
- to register. Example: cpufreq_driver=powernow-k8
- Format: { none | STRING }
-
cpuidle.off=1 [CPU_IDLE]
disable the cpuidle sub-system
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 4e9eb07704e5..f98c9438760c 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -2880,20 +2880,6 @@ static int cpuhp_cpufreq_offline(unsigned int cpu)
return 0;
}
-static char cpufreq_driver_name[CPUFREQ_NAME_LEN];
-
-static int __init cpufreq_driver_setup(char *str)
-{
- strscpy(cpufreq_driver_name, str, CPUFREQ_NAME_LEN);
- return 1;
-}
-
-/*
- * Set this name to only allow one specific cpu freq driver, e.g.,
- * cpufreq_driver=powernow-k8
- */
-__setup("cpufreq_driver=", cpufreq_driver_setup);
-
/**
* cpufreq_register_driver - register a CPU Frequency driver
* @driver_data: A struct cpufreq_driver containing the values#
@@ -2929,13 +2915,7 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
(driver_data->adjust_perf && !driver_data->fast_switch))
return -EINVAL;
- pr_debug("trying to register driver %s, cpufreq_driver=%s\n",
- driver_data->name, cpufreq_driver_name);
-
- if (cpufreq_driver_name[0])
- if (!driver_data->name ||
- strcmp(cpufreq_driver_name, driver_data->name))
- return -EINVAL;
+ pr_debug("trying to register driver %s\n", driver_data->name);
/* Protect against concurrent CPU online/offline. */
cpus_read_lock();
--
2.43.0
More information about the kernel-team
mailing list