diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2023-09-20 15:12:40 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2023-09-28 19:24:30 +0300 |
commit | b2172a9330b5e48f37c3d4f29604727228b39885 (patch) | |
tree | 8ca4872c42d3fc2fce43ecfe8da8f2b62b1ea8b7 /drivers/net/wireless/ralink/rt2x00 | |
parent | 2a1c5c7de468801d414dcb4410aba32c3ee7207b (diff) | |
download | linux-b2172a9330b5e48f37c3d4f29604727228b39885.tar.xz |
wifi: rt2x00: remove redundant check if u8 array element is less than zero
The check on vga_gain[ch_idx] being less than zero is always false since
vga_gain is a u8 array. Clean up the code by removing the check and the
following assignment. Cleans up clang scan build warning:
drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9704:26: warning:
result of comparison of unsigned expression < 0 is always
false [-Wtautological-unsigned-zero-compare]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230920121240.120455-1-colin.i.king@gmail.com
Diffstat (limited to 'drivers/net/wireless/ralink/rt2x00')
-rw-r--r-- | drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c index e65cc00fa17c..fe11fa4917ac 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c @@ -9700,9 +9700,6 @@ static void rt2800_loft_iq_calibration(struct rt2x00_dev *rt2x00dev) rt2x00_dbg(rt2x00dev, "Used VGA %d %x\n", vga_gain[ch_idx], rfvga_gain_table[vga_gain[ch_idx]]); - - if (vga_gain[ch_idx] < 0) - vga_gain[ch_idx] = 0; } rfvalue = rfvga_gain_table[vga_gain[ch_idx]]; |