cpufreq: Drop unused cpufreq_get_policy()
PATCH 1/1 cpufreq: Drop unused cpufreq_get_policy()
From: Rafael J. Wysocki <[email protected]>
A recent change has introduced a bug into cpufreq_get_policy(), but this function is not used, so it's better to drop it altogether.
Reported-by Dan Carpenter <[email protected]>
Signed-off-by Rafael J. Wysocki <[email protected]>
--- drivers/cpufreq/cpufreq.c | 25 ------------------------- include/linux/cpufreq.h | 1 - 2 files changed, 26 deletions(-)
drivers/cpufreq/cpufreq.c +0 -25
@@ -2549,31 +2549,6 @@* POLICY INTERFACE * *********************************************************************/ -/** -* cpufreq_get_policy - get the current cpufreq_policy -* @policy: struct cpufreq_policy into which the current cpufreq_policy -* is written -* @cpu: CPU to find the policy for -* -* Reads the current cpufreq policy. -*/ -int cpufreq_get_policy (struct cpufreq_policy *policy,unsigned int cpu) -{ - struct cpufreq_policy *cpu_policy __free(put_cpufreq_policy); - -if (!policy) -return -EINVAL ; - - cpu_policy =cpufreq_cpu_get (cpu); -if (!cpu_policy) -return -EINVAL ; - -memcpy (policy, cpu_policy,sizeof (*policy)); - -return 0 ; -} -EXPORT_SYMBOL (cpufreq_get_policy); - DEFINE_PER_CPU(unsigned long, cpufreq_pressure);/**
include/linux/cpufreq.h +0 -1
@@ -241,7 +241,6 @@u64 get_cpu_idle_time (unsigned int cpu,u64 *wall,int io_busy); -int cpufreq_get_policy (struct cpufreq_policy *policy,unsigned int cpu);void refresh_frequency_limits (struct cpufreq_policy *policy);void cpufreq_update_policy (unsigned int cpu);void cpufreq_update_limits (unsigned int cpu);
Quoted 11 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
A recent change has introduced a bug into
cpufreq_get_policy(), but this function is not used, so it's better to drop it altogether.Reported-by Dan Carpenter <[email protected]>Signed-off-by Rafael J. Wysocki <[email protected]>--- drivers/cpufreq/cpufreq.c | 25 ------------------------- include/linux/cpufreq.h | 1 - 2 files changed, 26 deletions(-)
Acked-by Viresh Kumar <[email protected]>
Signature · 1 line
viresh
Quoted 5 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
A recent change has introduced a bug into
cpufreq_get_policy(), but this function is not used, so it's better to drop it altogether.
Acked-by Sudeep Holla <[email protected]>
Signature · 2 lines
Regards, Sudeep