]> git.karo-electronics.de Git - karo-tx-linux.git/commit
m68k/mac: Fix compiler warning in via_read_time()
authorFinn Thain <fthain@telegraphics.com.au>
Sun, 17 Jul 2011 14:06:10 +0000 (00:06 +1000)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 16 Aug 2011 14:44:39 +0000 (16:44 +0200)
commit6d20032ffaf12e54166919b22b1583f8fbd57af8
treef4e2b592a410c2c027778c7696942d62e98f99e7
parent93ee7a9340d64f20295aacc3fb6a22b759323280
m68k/mac: Fix compiler warning in via_read_time()

The algorithm described in the comment compares two reads from the RTC but
the code actually reads once and compares the result to an uninitialized
value. This causes the compiler to warn, "last_result maybe used
uninitialized". Make the code match the comment, fix the warning and
perhaps improve reliability. Tested on a Quadra 700.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
arch/m68k/mac/misc.c