All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] wifi: rt2x00: Remove useless else if
@ 2023-01-06  2:27 Jiapeng Chong
  2023-01-06 10:18 ` Stanislaw Gruszka
  2023-01-16 16:24 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Jiapeng Chong @ 2023-01-06  2:27 UTC (permalink / raw)
  To: stf_xl
  Cc: helmut.schaa, kvalo, davem, edumazet, kuba, pabeni,
	linux-wireless, netdev, linux-kernel, Jiapeng Chong, Abaci Robot

The assignment of the else and else if branches is the same, so the else
if here is redundant, so we remove it.

./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@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
Changes in v2:
  -Remove useful comment and modify commit message.

 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
index 12b700c7b9c3..1226a883cd67 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -8924,8 +8924,6 @@ 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
 					result = bbptemp;
 
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] wifi: rt2x00: Remove useless else if
  2023-01-06  2:27 [PATCH v2] wifi: rt2x00: Remove useless else if Jiapeng Chong
@ 2023-01-06 10:18 ` Stanislaw Gruszka
  2023-01-16 16:24 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Stanislaw Gruszka @ 2023-01-06 10:18 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: helmut.schaa, kvalo, davem, edumazet, kuba, pabeni,
	linux-wireless, netdev, linux-kernel, Abaci Robot

On Fri, Jan 06, 2023 at 10:27:31AM +0800, Jiapeng Chong wrote:
> The assignment of the else and else if branches is the same, so the else
> if here is redundant, so we remove it.
> 
> ./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@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] wifi: rt2x00: Remove useless else if
  2023-01-06  2:27 [PATCH v2] wifi: rt2x00: Remove useless else if Jiapeng Chong
  2023-01-06 10:18 ` Stanislaw Gruszka
@ 2023-01-16 16:24 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2023-01-16 16:24 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: stf_xl, helmut.schaa, davem, edumazet, kuba, pabeni,
	linux-wireless, netdev, linux-kernel, Jiapeng Chong, Abaci Robot

Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:

> The assignment of the else and else if branches is the same, so the else
> if here is redundant, so we remove it.
> 
> ./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@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>

Patch applied to wireless-next.git, thanks.

ebe8dee7aea6 wifi: rt2x00: Remove useless else if

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20230106022731.111243-1-jiapeng.chong@linux.alibaba.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-16 16:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06  2:27 [PATCH v2] wifi: rt2x00: Remove useless else if Jiapeng Chong
2023-01-06 10:18 ` Stanislaw Gruszka
2023-01-16 16:24 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.