On 30 January 2013 21:53, Fabio Baltieri <fabio.baltieri@xxxxxxxxxx> wrote: > On Wed, Jan 30, 2013 at 08:32:38PM +0530, Viresh Kumar wrote: >> I believe this routine should be rather present in cpufreq core code, >> as their might >> be other users of it. Its really not related to dbs or governors. >> >> My ideas about the name of routine then: >> - policy_is_shared() >> - or something better you have :) > > So you are suggesting to rethink this function to be related to policy > rather than dbs... this may as well become an inline in cpufreq.h, as: > > static inline bool policy_is_shared(struct cpufreq_policy *policy) > { > return cpumask_weight(policy->cpus) > 1; > } Perfect. > I'm not sure about the name through, I like mentioning sw coordination in it > because that's the comment in the declaration: > > cpumask_var_t cpus; /* CPUs requiring sw coordination */ > cpumask_var_t related_cpus; /* CPUs with any coordination */ > > And those two are already confusing as a starting point. I will fix these comments with a patch of mine. > Anyway, this sounds fine to me. If you think this is useful I can send > a patch, or feel free to include it in your patches if you plan to do > further cleanup work on this code. > > /me tries to also keep that ->cpu field in mind. You can make it part of your patchsets v8. -- To unsubscribe from this list: send the line "unsubscribe cpufreq" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html