Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cpufreq: SCMI: Don't validate the frequency table twice

The cpufreq core is already validating the CPU frequency table after
calling the ->init() callback of the cpufreq drivers and the drivers
don't need to do the same anymore. Though they need to set the
policy->freq_table field directly from the ->init() callback now.

Stop validating the frequency table from SCMI driver.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Viresh Kumar and committed by
Rafael J. Wysocki
d983af98 8913315e

+1 -9
+1 -9
drivers/cpufreq/scmi-cpufreq.c
··· 159 159 priv->domain_id = handle->perf_ops->device_domain_id(cpu_dev); 160 160 161 161 policy->driver_data = priv; 162 - 163 - ret = cpufreq_table_validate_and_show(policy, freq_table); 164 - if (ret) { 165 - dev_err(cpu_dev, "%s: invalid frequency table: %d\n", __func__, 166 - ret); 167 - goto out_free_cpufreq_table; 168 - } 162 + policy->freq_table = freq_table; 169 163 170 164 /* SCMI allows DVFS request for any domain from any CPU */ 171 165 policy->dvfs_possible_from_any_cpu = true; ··· 173 179 policy->fast_switch_possible = true; 174 180 return 0; 175 181 176 - out_free_cpufreq_table: 177 - dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); 178 182 out_free_priv: 179 183 kfree(priv); 180 184 out_free_opp: