Skip to content

Commit

Permalink
hrtimer: Simplify get_target_base() by returning current base
Browse files Browse the repository at this point in the history
Instead of fetching again the current cpu base, just take it from the
parameter.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1439907509-9553-2-git-send-email-fweisbec@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Frederic Weisbecker authored and Thomas Gleixner committed Aug 18, 2015
1 parent 75e3b37 commit 662b3e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/time/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,15 @@ struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base,
int pinned)
{
if (pinned || !base->migration_enabled)
return this_cpu_ptr(&hrtimer_bases);
return base;
return &per_cpu(hrtimer_bases, get_nohz_timer_target());
}
#else
static inline
struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base,
int pinned)
{
return this_cpu_ptr(&hrtimer_bases);
return base;
}
#endif

Expand Down

0 comments on commit 662b3e1

Please sign in to comment.