]> git.baikalelectronics.ru Git - kernel.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>
Mon, 24 Oct 2011 19:00:34 +0000 (21:00 +0200)
commit4519ec81e2116431f34b00c9dc7c4089c769fb7a
treeba6582c7c0c5c54dd5b986b324354b743a2a8299
parent01784d1f76bb2ecf98537f467ddfc2714f740a6c
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