kernel/hrtimer.c(511): remark #593: variable "base" was set but never used
Hello there,
I just tried to compile Linux kernel 2.6.18.3 with the Intel C C compiler.
The compiler said
kernel/hrtimer.c(511): remark #593: variable "base" was set but never used
The source code is
struct hrtimer_base *base;
I have checked the source code and I agree with the compiler. Suggest delete local variable.
Regards
David Binderman
_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters
PATCH 1/1 hrtimer: remove unused variable
Remove unused 'base' variable.
Cc Thomas Gleixner <[email protected]>
Signed-off-by David Rientjes <[email protected]>
--- kernel/hrtimer.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
kernel/hrtimer.c +1 -2
@@ -508,11 +508,10 @@ EXPORT_SYMBOL_GPL(hrtimer_cancel);*/ ktime_t hrtimer_get_remaining (const struct hrtimer *timer) { -struct hrtimer_base *base;unsigned long flags;ktime_t rem; - base =lock_hrtimer_base (timer, &flags); +lock_hrtimer_base (timer, &flags); rem =ktime_sub (timer->expires, timer->base->get_time ());unlock_hrtimer_base (timer, &flags);
Re: [PATCH] hrtimer: remove unused variable
Quoted 2 lines · David Rientjes
Remove unused 'base' variable.
Or just use it.
Signed-off-by Steven Rostedt <[email protected]>
kernel/hrtimer.c +1 -1
@@ -513,7 +513,7 @@ ktime_t hrtimer_get_remaining(const struktime_t rem; base =lock_hrtimer_base (timer, &flags); - rem =ktime_sub (timer->expires, timer->base->get_time ()); + rem =ktime_sub (timer->expires, base->get_time ());unlock_hrtimer_base (timer, &flags);return rem;