From: Oleg Nesterov __get_base() was added to reduce the changes in previous patches. This patch removes it. Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton --- 25-akpm/kernel/timer.c | 22 +++++++--------------- 1 files changed, 7 insertions(+), 15 deletions(-) diff -puN kernel/timer.c~timers-cleanup-kill-__get_base kernel/timer.c --- 25/kernel/timer.c~timers-cleanup-kill-__get_base 2005-03-19 14:20:01.000000000 -0800 +++ 25-akpm/kernel/timer.c 2005-03-19 14:20:01.000000000 -0800 @@ -86,16 +86,6 @@ static inline void set_running_timer(tve #endif } -static inline tvec_base_t *__get_base(struct timer_list *timer) -{ - tvec_base_t *base = timer->_base; - - if (__timer_pending(base)) - return (void*)base - __TIMER_PENDING; - else - return NULL; -} - static inline void __set_base(struct timer_list *timer, tvec_base_t *base, int pending) { @@ -323,16 +313,18 @@ EXPORT_SYMBOL(mod_timer); int del_timer(struct timer_list *timer) { unsigned long flags; - tvec_base_t *base; + tvec_base_t *_base, *base; check_timer(timer); repeat: - base = __get_base(timer); - if (!base) + _base = timer->_base; + if (!__timer_pending(_base)) return 0; + + base = (void*)_base - __TIMER_PENDING; spin_lock_irqsave(&base->lock, flags); - if (base != __get_base(timer)) { + if (_base != timer->_base) { spin_unlock_irqrestore(&base->lock, flags); goto repeat; } @@ -445,7 +437,7 @@ static int cascade(tvec_base_t *base, tv struct timer_list *tmp; tmp = list_entry(curr, struct timer_list, entry); - BUG_ON(__get_base(tmp) != base); + BUG_ON(tmp->_base != ((void*)base + __TIMER_PENDING)); curr = curr->next; internal_add_timer(base, tmp); } _