[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230105085802.30905-1-jiapeng.chong@linux.alibaba.com>
Date: Thu, 5 Jan 2023 16:58:02 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: stf_xl@...pl
Cc: helmut.schaa@...glemail.com, kvalo@...nel.org, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH] wifi: rt2x00: Remove useless else if
The assignment of the else and else if branches is the same, so the else
if here is redundant, so we remove it and add a comment to make the code
here readable.
./drivers/net/wireless/ralink/rt2x00/rt2800lib.c:8927:9-11: WARNING: possible condition with no effect (if == else).
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3631
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
index 12b700c7b9c3..36b9cd4dd138 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -8924,9 +8924,7 @@ static void rt2800_rxiq_calibration(struct rt2x00_dev *rt2x00dev)
if (i < 2 && (bbptemp & 0x800000))
result = (bbptemp & 0xffffff) - 0x1000000;
- else if (i == 4)
- result = bbptemp;
- else
+ else /* This branch contains if(i==4) */
result = bbptemp;
if (i == 0)
--
2.20.1.7.g153144c
Powered by blists - more mailing lists