lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 25 Aug 2020 12:07:56 +0100 From: Ionela Voinescu <ionela.voinescu@....com> To: Viresh Kumar <viresh.kumar@...aro.org> Cc: rjw@...ysocki.net, dietmar.eggemann@....com, catalin.marinas@....com, sudeep.holla@....com, will@...nel.org, valentin.schneider@....com, linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH v3 3/5] cpufreq: report whether cpufreq supports Frequency Invariance (FI) Hi Viresh, On Tuesday 25 Aug 2020 at 11:57:09 (+0530), Viresh Kumar wrote: [..] > > +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. > > > +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.
Powered by blists - more mailing lists