rtc: s35390a: Change buf's type to u8 in s35390a_init
commit7f1e41c76f79b6224a239cfab470fda40413ca3b
authorNathan Chancellor <natechancellor@gmail.com>
Fri, 19 Oct 2018 20:43:45 +0000 (19 13:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Nov 2019 17:25:49 +0000 (28 18:25 +0100)
treec8859ceedff20189ca2aabdf5cfae501e1bb0416
parentf3f19ddcdbc6c5fb8eaf0b652d84bbc5216722b4
rtc: s35390a: Change buf's type to u8 in s35390a_init

[ Upstream commit ef0f02fd69a02b50e468a4ddbe33e3d81671e248 ]

Clang warns:

drivers/rtc/rtc-s35390a.c:124:27: warning: implicit conversion from
'int' to 'char' changes value from 192 to -64 [-Wconstant-conversion]
        buf = S35390A_FLAG_RESET | S35390A_FLAG_24H;
            ~ ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
1 warning generated.

Update buf to be an unsigned 8-bit integer, which matches the buf member
in struct i2c_msg.

https://github.com/ClangBuiltLinux/linux/issues/145
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/rtc/rtc-s35390a.c