timers: Move local variable into else section

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, May 28, 2010 - 11:59 am

Gitweb:     http://git.kernel.org/linus/2abfb9e1d470f7082e5e20e4b11a271a0124211b
Commit:     2abfb9e1d470f7082e5e20e4b11a271a0124211b
Parent:     8e63d7795e30b4091e303cc8c060509bd8eea742
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Wed May 26 16:07:13 2010 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed May 26 16:07:13 2010 +0200

    timers: Move local variable into else section
    
    Fix nit-picking coding style detail.
    
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/timer.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/timer.c b/kernel/timer.c
index d8decb8..2211834 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -747,7 +747,7 @@ EXPORT_SYMBOL(mod_timer_pending);
 static inline
 unsigned long apply_slack(struct timer_list *timer, unsigned long expires)
 {
-	unsigned long expires_limit, mask, now;
+	unsigned long expires_limit, mask;
 	int bit;
 
 	expires_limit = expires;
@@ -755,7 +755,8 @@ unsigned long apply_slack(struct timer_list *timer, unsigned long expires)
 	if (timer->slack >= 0) {
 		expires_limit = expires + timer->slack;
 	} else {
-		now = jiffies;
+		unsigned long now = jiffies;
+
 		/* No slack, if already expired else auto slack 0.4% */
 		if (time_after(expires, now))
 			expires_limit = expires + (expires - now)/256;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
timers: Move local variable into else section, Linux Kernel Mailing ..., (Fri May 28, 11:59 am)