[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpomVKac+1c7rNseUKM_RCVaNiFsaioJuW98oLJP5atSaSg@mail.gmail.com>
Date: Sat, 3 Aug 2013 22:43:45 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: rjw@...k.pl
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, Viresh Kumar <viresh.kumar@...aro.org>
Subject: Re: [PATCH 02/10] cpufreq: Re-arrange declarations in cpufreq.h
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]
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 *
--
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