]> git.karo-electronics.de Git - linux-beck.git/commit
rtc: sunxi: fix signedness issues
authorLABBE Corentin <clabbe.montjoie@gmail.com>
Thu, 19 Nov 2015 10:50:08 +0000 (11:50 +0100)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Mon, 11 Jan 2016 19:19:56 +0000 (20:19 +0100)
commitf8947feb2c0196dafa7683f557eb8dddfb1ae167
tree0d4c298450ccf52b02ad1b11b7436d1767462f0c
parent3fc2c14acaf925768db37cf439c628bfa71dff09
rtc: sunxi: fix signedness issues

The variable year must be set as unsigned since it is used with
sunxi_rtc_data_year{.min|.max} and as parameter of is_leap_year() which
wait for unsigned int.
Only tm_year is not unsigned, but it is long.
This patch fix also the format of printing of min/max. (must use %u since
they are unsigned)

The parameter to of sunxi_rtc_setaie() must be set to uint since callers
give always uint data.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-sunxi.c