[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9279b89e2ff1f531e9b8cbf09d30f68c1de1c433.1396592516.git.viresh.kumar@linaro.org>
Date: Fri, 4 Apr 2014 12:05:51 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: tglx@...utronix.de
Cc: linaro-kernel@...ts.linaro.org, fweisbec@...il.com,
linaro-networking@...aro.org, Arvind.Chauhan@....com,
linux-kernel@...r.kernel.org,
Viresh Kumar <viresh.kumar@...aro.org>
Subject: [PATCH V2 08/36] hrtimer: move unlock_hrtimer_base() upwards
unlock_hrtimer_base() was handled specially at a separate place earlier as
lock_hrtimer_base() had separate definitions for SMP and non-SMP cases, but
unlock_hrtimer_base() had only a single definition. And so probably it was kept
at the end of this #ifdef/endif CONFIG_SMP. But this #ifdef ends right after
lock_hrtimer_base()'s definition (Atleast in the current code) and so we can
move unlock_hrtimer_base() upwards, i.e. closer to its counterparts. This
improves readability of the code.
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
kernel/hrtimer.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index db580ab..3b29023 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -254,6 +254,12 @@ lock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags)
#endif /* !CONFIG_SMP */
+static inline
+void unlock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags)
+{
+ raw_spin_unlock_irqrestore(&timer->base->cpu_base->lock, *flags);
+}
+
/*
* Functions for the union type storage format of ktime_t which are
* too large for inlining:
@@ -805,15 +811,6 @@ static inline void timer_stats_account_hrtimer(struct hrtimer *timer)
#endif
}
-/*
- * Counterpart to lock_hrtimer_base above:
- */
-static inline
-void unlock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags)
-{
- raw_spin_unlock_irqrestore(&timer->base->cpu_base->lock, *flags);
-}
-
/**
* hrtimer_forward - forward the timer expiry
* @timer: hrtimer to forward
--
1.7.12.rc2.18.g61b472e
--
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