From 78df8c68cd42c9db3601b331018b82e9627d08ce Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Thu, 1 Mar 2012 13:29:38 +0900 Subject: [PATCH] sh: timer: Remove unnecessary variable 'ticks' Signed-off-by: Nobuhiro Iwamatsu Reported-by: Mike Frysinger Signed-off-by: Nobuhiro Iwamatsu --- arch/sh/lib/time.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/sh/lib/time.c b/arch/sh/lib/time.c index c70baedbf1..a01596cace 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; -- 2.25.1