[PATCH V2 30/36] hrtimer: remove 'base' parameter from enqueue_hrtimer()

From: Viresh Kumar
Date: Fri Apr 04 2014 - 02:43:00 EST


clock 'base' can be obtained easily by doing timer->base and enqueue_hrtimer()
never gets anything else than timer->base as its parameter. And so this routines
doesn't require this parameter. Remove it.

Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
---
kernel/hrtimer.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index c35dc36..abbf155 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -867,9 +867,10 @@ EXPORT_SYMBOL_GPL(hrtimer_forward);
*
* Returns 1 when the new timer is the leftmost timer in the tree.
*/
-static int enqueue_hrtimer(struct hrtimer *timer,
- struct hrtimer_clock_base *base)
+static int enqueue_hrtimer(struct hrtimer *timer)
{
+ struct hrtimer_clock_base *base = timer->base;
+
debug_activate(timer);

timerqueue_add(&base->active, &timer->node);
@@ -981,7 +982,7 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,

timer_stats_hrtimer_set_start_info(timer);

- leftmost = enqueue_hrtimer(timer, new_base);
+ leftmost = enqueue_hrtimer(timer);

/*
* Only allow reprogramming if the new base is on this CPU.
@@ -1210,8 +1211,7 @@ EXPORT_SYMBOL_GPL(hrtimer_get_res);

static void __run_hrtimer(struct hrtimer *timer, ktime_t *now)
{
- struct hrtimer_clock_base *base = timer->base;
- struct hrtimer_cpu_base *cpu_base = base->cpu_base;
+ struct hrtimer_cpu_base *cpu_base = timer->base->cpu_base;
enum hrtimer_restart (*fn)(struct hrtimer *);
int restart;

@@ -1240,7 +1240,7 @@ static void __run_hrtimer(struct hrtimer *timer, ktime_t *now)
*/
if (restart != HRTIMER_NORESTART) {
BUG_ON(timer->state != HRTIMER_STATE_CALLBACK);
- enqueue_hrtimer(timer, base);
+ enqueue_hrtimer(timer);
}

WARN_ON_ONCE(!(timer->state & HRTIMER_STATE_CALLBACK));
@@ -1665,7 +1665,7 @@ static void migrate_hrtimer_list(struct hrtimer_clock_base *old_base,
* sort out already expired timers and reprogram the
* event device.
*/
- enqueue_hrtimer(timer, new_base);
+ enqueue_hrtimer(timer);

/* Clear the migration state bit */
timer->state &= ~HRTIMER_STATE_MIGRATE;
--
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/