[U-Boot] [PATCH] sh: timer: Remove unnecessary variable 'ticks'

Nobuhiro Iwamatsu nobuhiro.iwamatsu.yj at renesas.com
Thu Mar 1 05:32:57 CET 2012


Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj at renesas.com>
Reported-by: Mike Frysinger <vapier at gentoo.org>
---
 arch/sh/lib/time.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/arch/sh/lib/time.c b/arch/sh/lib/time.c
index c70baed..a01596c 100644
--- a/arch/sh/lib/time.c
+++ b/arch/sh/lib/time.c
@@ -108,14 +108,9 @@ int timer_init (void)
 unsigned long long get_ticks (void)
 {
 	unsigned long tcnt = 0 - readl(TCNT0);
-	unsigned long ticks;
 
-	if (last_tcnt > tcnt) { /* overflow */
+	if (last_tcnt > tcnt) /* overflow */
 		overflow_ticks++;
-		ticks = (0xffffffff - last_tcnt) + tcnt;
-	} else {
-		ticks = tcnt;
-	}
 	last_tcnt = tcnt;
 
 	return (overflow_ticks << 32) | tcnt;
-- 
1.7.9.1



More information about the U-Boot mailing list