Commit 51c9daec authored by Jason A. Donenfeld's avatar Jason A. Donenfeld

sparc: sbus: treat CPU index as integer

Using a `char` to fit a CPU index is too small, and assigning -1 to it
isn't correct either, since `char` is sometimes signed and sometimes
not. In this case, it's been fine since this driver only works on sparc,
but that will soon be changing when chars become unsigned everywhere. So
instead, use a normal `int` type, which matches the `int cpu` function
argument that this is being compared against.

Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
parent adcd7118
...@@ -363,8 +363,8 @@ static int envctrl_read_cpu_info(int cpu, struct i2c_child_t *pchild, ...@@ -363,8 +363,8 @@ static int envctrl_read_cpu_info(int cpu, struct i2c_child_t *pchild,
char mon_type, unsigned char *bufdata) char mon_type, unsigned char *bufdata)
{ {
unsigned char data; unsigned char data;
int i; int i, j = -1;
char *tbl, j = -1; char *tbl;
/* Find the right monitor type and channel. */ /* Find the right monitor type and channel. */
for (i = 0; i < PCF8584_MAX_CHANNELS; i++) { for (i = 0; i < PCF8584_MAX_CHANNELS; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment