Thread (14 messages) 14 messages, 2 authors, 2020-08-27

Re: [PATCH v3 3/5] cpufreq: report whether cpufreq supports Frequency Invariance (FI)

From: Ionela Voinescu <hidden>
Date: 2020-08-25 11:08:04
Also in: linux-arm-kernel, lkml

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help