Re: [PATCH 04/14] hrtimer: use base->index instead of basenum in switch_hrtimer_base()

2014-03-26 Thread Srivatsa S. Bhat
On 03/26/2014 11:01 PM, Thomas Gleixner wrote: > On Wed, 26 Mar 2014, Srivatsa S. Bhat wrote: >> On 03/26/2014 04:51 PM, Viresh Kumar wrote: >>> In switch_hrtimer_base() we have created a local variable basenum which is >>> set >>> to base->index. This variable is used at only one place. It makes

Re: [PATCH 04/14] hrtimer: use base->index instead of basenum in switch_hrtimer_base()

2014-03-26 Thread Thomas Gleixner
On Wed, 26 Mar 2014, Srivatsa S. Bhat wrote: > On 03/26/2014 04:51 PM, Viresh Kumar wrote: > > In switch_hrtimer_base() we have created a local variable basenum which is > > set > > to base->index. This variable is used at only one place. It makes code more > > readable if we remove this variable

Re: [LNG] Re: [PATCH 04/14] hrtimer: use base->index instead of basenum in switch_hrtimer_base()

2014-03-26 Thread Viresh Kumar
On 26 March 2014 17:13, Srivatsa S. Bhat wrote: >> + new_base = &new_cpu_base->clock_base[base->index]; > > Further down, timer->base can be altered (and set to NULL too). > So if we jump back to 'again', we'll end up in trouble. > So I think its important to cache the value in basenum and > u

Re: [PATCH 04/14] hrtimer: use base->index instead of basenum in switch_hrtimer_base()

2014-03-26 Thread Srivatsa S. Bhat
On 03/26/2014 04:51 PM, Viresh Kumar wrote: > In switch_hrtimer_base() we have created a local variable basenum which is set > to base->index. This variable is used at only one place. It makes code more > readable if we remove this variable use base->index directly. > No, this doesn't look right.

[PATCH 04/14] hrtimer: use base->index instead of basenum in switch_hrtimer_base()

2014-03-26 Thread Viresh Kumar
In switch_hrtimer_base() we have created a local variable basenum which is set to base->index. This variable is used at only one place. It makes code more readable if we remove this variable use base->index directly. Signed-off-by: Viresh Kumar --- kernel/hrtimer.c | 3 +-- 1 file changed, 1 ins