]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: r9701: stop setting RWKCNT
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 15 Oct 2020 19:11:33 +0000 (21:11 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 19 Oct 2020 20:48:55 +0000 (22:48 +0200)
commitaa8c742c87c601392b514d038c3a51d1791bd004
tree57a64302d18919402b7afad86f2c58db059738c8
parenta30b5b317f9019eabfb553fbd429a31d46d77ab6
rtc: r9701: stop setting RWKCNT

tm_wday is never checked for validity and it is not read back in
r9701_get_datetime. Avoid setting it to stop tripping static checkers:

        drivers/rtc/rtc-r9701.c:109 r9701_set_datetime()
        error: undefined (user controlled) shift '1 << dt->tm_wday'

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20201015191135.471249-4-alexandre.belloni@bootlin.com
drivers/rtc/rtc-r9701.c