diff mbox

[V2,10/36] hrtimer: use base->index instead of basenum in switch_hrtimer_base()

Message ID e68fe7a094852108be0d3f7bbb5194f0ed7d9cf5.1396592516.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar April 4, 2014, 6:35 a.m. UTC
In switch_hrtimer_base() we have created a local variable basenum which is set
to base->index initially. This variable is used at only one place. It makes code
more readable if we remove this variable and use base->index directly.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 kernel/hrtimer.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 3b29023..04e4c77 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -202,11 +202,10 @@  switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base,
 	struct hrtimer_cpu_base *new_cpu_base;
 	int this_cpu = smp_processor_id();
 	int cpu = get_nohz_timer_target(pinned);
-	int basenum = base->index;
 
 again:
 	new_cpu_base = &per_cpu(hrtimer_bases, cpu);
-	new_base = &new_cpu_base->clock_base[basenum];
+	new_base = &new_cpu_base->clock_base[base->index];
 
 	if (base != new_base) {
 		/*