Hi Viresh,
On Tuesday 25 Aug 2020 at 11:57:09 (+0530), Viresh Kumar wrote:
[..]
quoted
+static inline
+void enable_cpufreq_freq_invariance(struct cpufreq_driver *driver)
+{
+ if (!driver->setpolicy) {
+ static_branch_enable_cpuslocked(&cpufreq_freq_invariance);
+ pr_debug("supports frequency invariance");
+ }
+}
+
I would rather open-code this int the cpufreq_register_driver() routine as
that's what is done in cpufreq_unregister_driver() as well.
quoted
+bool cpufreq_supports_freq_invariance(void)
+{
+ return static_branch_likely(&cpufreq_freq_invariance);
+}
+
And would keep the definition of the static key with this routine at a single
place.
Makes sense and will do!
Thank you for the quick review,
Ionela.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel