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

staging: iio: ad2s1210: remove redundant assignment to variable negative

Variable negative is being assigned a value that is never read, it is
being re-assigned later. The assignment is redundant and can be removed.

Cleans up clang scan build warning:
drivers/staging/iio/resolver/ad2s1210.c:502:3: warning: Value stored
to 'negative' is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220418134603.81336-1-colin.i.king@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Colin Ian King and committed by
Jonathan Cameron
0a9599e1 0ac507bb

-1
-1
drivers/staging/iio/resolver/ad2s1210.c
··· 499 499 ret = IIO_VAL_INT; 500 500 break; 501 501 case IIO_ANGL_VEL: 502 - negative = st->rx[0] & 0x80; 503 502 vel = be16_to_cpup((__be16 *)st->rx); 504 503 vel >>= 16 - st->resolution; 505 504 if (vel & 0x8000) {