]> git.itanic.dy.fi Git - linux-stable/commit
sparc: sbus: treat CPU index as integer
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 28 Oct 2022 14:22:56 +0000 (16:22 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 18 Nov 2022 23:56:15 +0000 (00:56 +0100)
commit51c9daec79b4fa8140cd5490abec4f1f3685ecd8
tree3fe982d775d7e750ef1ef9be16bef04bd78a6e00
parentadcd7118caadac54666081be39bbbc3e9b5e1f7d
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>
drivers/sbus/char/envctrl.c