]> 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)
commitd2eda654ed9f5a610c7f439c9bd9a8c52e2e2ea3
treeba6582c7c0c5c54dd5b986b324354b743a2a8299
parentf346269919a254994990ff7e0918c002aa196b2d
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