[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2642814.MCfbiQte2U@vostro.rjw.lan>
Date: Sat, 03 Aug 2013 23:43:27 +0200
From: "Rafael J. Wysocki" <rjw@...k.pl>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: linaro-kernel@...ts.linaro.org, patches@...aro.org,
cpufreq@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, srivatsa.bhat@...ux.vnet.ibm.com,
l.majewski@...sung.com
Subject: Re: [PATCH 02/10] cpufreq: Re-arrange declarations in cpufreq.h
On Saturday, August 03, 2013 10:43:45 PM Viresh Kumar wrote:
> On 3 August 2013 17:19, Viresh Kumar <viresh.kumar@...aro.org> 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 <viresh.kumar@...aro.org>
> > ---
> > 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists