diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2018-10-19 13:43:45 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-01 09:13:44 +0100 |
commit | 3a17e015ec5bcba313a76f73a20f375329233765 (patch) | |
tree | dbeb47b63b78600422a6f0f9ec9165be85d146a6 /drivers/rtc | |
parent | 1a62bbf3edf08ccded88761431e8614fe7494df0 (diff) | |
download | linux-stable-3a17e015ec5bcba313a76f73a20f375329233765.tar.gz linux-stable-3a17e015ec5bcba313a76f73a20f375329233765.tar.bz2 linux-stable-3a17e015ec5bcba313a76f73a20f375329233765.zip |
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>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-s35390a.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-s35390a.c b/drivers/rtc/rtc-s35390a.c index 7067bca5c20d..6bfff0a6d655 100644 --- a/drivers/rtc/rtc-s35390a.c +++ b/drivers/rtc/rtc-s35390a.c @@ -108,7 +108,7 @@ static int s35390a_get_reg(struct s35390a *s35390a, int reg, char *buf, int len) static int s35390a_init(struct s35390a *s35390a) { - char buf; + u8 buf; int ret; unsigned initcount = 0; |