Skip to content

Commit

Permalink
rtc: s35390a: Change buf's type to u8 in s35390a_init
Browse files Browse the repository at this point in the history
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.

ClangBuiltLinux/linux#145
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
  • Loading branch information
nathanchance authored and alexandrebelloni committed Oct 22, 2018
1 parent 7dceef7 commit ef0f02f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-s35390a.c
Expand Up @@ -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;

Expand Down

0 comments on commit ef0f02f

Please sign in to comment.