lkml.org 
[lkml]   [2013]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH 02/10] cpufreq: Re-arrange declarations in cpufreq.h
From
On 3 August 2013 17:19, Viresh Kumar <viresh.kumar@linaro.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@linaro.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 *

\
 
 \ /
  Last update: 2013-08-03 19:41    [W:0.099 / U:2.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site