Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Jason A. Donenfeld <Jason@zx2c4.com>

+2 -2
+2 -2
drivers/sbus/char/envctrl.c
··· 363 363 char mon_type, unsigned char *bufdata) 364 364 { 365 365 unsigned char data; 366 - int i; 367 - char *tbl, j = -1; 366 + int i, j = -1; 367 + char *tbl; 368 368 369 369 /* Find the right monitor type and channel. */ 370 370 for (i = 0; i < PCF8584_MAX_CHANNELS; i++) {