summaryrefslogtreecommitdiffstats
path: root/arch/sh/lib
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>2012-03-01 13:29:38 +0900
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>2012-03-08 10:26:38 +0900
commit78df8c68cd42c9db3601b331018b82e9627d08ce (patch)
treed611052652d738f4d333cf2a06d6a2fe91ad4874 /arch/sh/lib
parent117029c510c75f4c6d7ecb1172635d6a08755cf8 (diff)
downloadtalos-obmc-uboot-78df8c68cd42c9db3601b331018b82e9627d08ce.tar.gz
talos-obmc-uboot-78df8c68cd42c9db3601b331018b82e9627d08ce.zip
sh: timer: Remove unnecessary variable 'ticks'
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Reported-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'arch/sh/lib')
-rw-r--r--arch/sh/lib/time.c7
1 files changed, 1 insertions, 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;
OpenPOWER on IntegriCloud