From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753253Ab3HCVdO (ORCPT ); Sat, 3 Aug 2013 17:33:14 -0400 Received: from hydra.sisk.pl ([212.160.235.94]:54230 "EHLO hydra.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753110Ab3HCVdM (ORCPT ); Sat, 3 Aug 2013 17:33:12 -0400 From: "Rafael J. Wysocki" To: Viresh Kumar Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, srivatsa.bhat@linux.vnet.ibm.com, l.majewski@samsung.com Subject: Re: [PATCH 02/10] cpufreq: Re-arrange declarations in cpufreq.h Date: Sat, 03 Aug 2013 23:43:27 +0200 Message-ID: <2642814.MCfbiQte2U@vostro.rjw.lan> User-Agent: KMail/4.9.5 (Linux/3.10.0+; KDE/4.9.5; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday, August 03, 2013 10:43:45 PM Viresh Kumar wrote: > On 3 August 2013 17:19, Viresh Kumar wrote: > > They are pretty much mixed up. Although generic headers are present but > > definitions/declarations are present outside them too.. > > > > This patch just moves stuff up and down to make it look better and consistent. > > > > Signed-off-by: Viresh Kumar > > --- > > include/linux/cpufreq.h | 370 +++++++++++++++++++++++------------------------- > > 1 file changed, 177 insertions(+), 193 deletions(-) > > Fixup due to compilation reported by Fengguang's kbuild system: > [Will post the series again once I receive more comments on it] OK, thanks. I'm waiting for the update of the whole series, then. > diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h > index a6b97e2..d568f39 100644 > --- a/include/linux/cpufreq.h > +++ b/include/linux/cpufreq.h > @@ -268,6 +268,19 @@ int cpufreq_unregister_notifier(struct > notifier_block *nb, unsigned int list); > void cpufreq_notify_transition(struct cpufreq_policy *policy, > struct cpufreq_freqs *freqs, unsigned int state); > > +#else /* CONFIG_CPU_FREQ */ > +static inline int cpufreq_register_notifier(struct notifier_block *nb, > + unsigned int list) > +{ > + return 0; > +} > +static inline int cpufreq_unregister_notifier(struct notifier_block *nb, > + unsigned int list) > +{ > + return 0; > +} > +#endif /* !CONFIG_CPU_FREQ */ > + > /** > * cpufreq_scale - "old * mult / div" calculation for large values (32-bit-arch > * safe) > @@ -282,32 +295,16 @@ static inline unsigned long > cpufreq_scale(unsigned long old, u_int div, > u_int mult) > { > #if BITS_PER_LONG == 32 > - > u64 result = ((u64) old) * ((u64) mult); > do_div(result, div); > return (unsigned long) result; > > #elif BITS_PER_LONG == 64 > - > unsigned long result = old * ((u64) mult); > result /= div; > return result; > - > #endif > -}; > - > -#else /* CONFIG_CPU_FREQ */ > -static inline int cpufreq_register_notifier(struct notifier_block *nb, > - unsigned int list) > -{ > - return 0; > } > -static inline int cpufreq_unregister_notifier(struct notifier_block *nb, > - unsigned int list) > -{ > - return 0; > -} > -#endif /* !CONFIG_CPU_FREQ */ > > /********************************************************************* > * CPUFREQ GOVERNORS * -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.