]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
sh: timer: Remove unnecessary variable 'ticks'
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Thu, 1 Mar 2012 04:29:38 +0000 (13:29 +0900)
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Thu, 8 Mar 2012 01:26:38 +0000 (10:26 +0900)
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>
arch/sh/lib/time.c

index c70baedbf1cac8e87f70b0019ce51b35c7c58a7e..a01596cace6eb2bb477b9fbb7e224a9f90239ee9 100644 (file)
@@ -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;