2022-04-24 16:49:42

by Jiabing Wan

[permalink] [raw]
Subject: [PATCH] ath9k: hif_usb: simplify if-if to if-else

Use if and else instead of if(A) and if (!A).

Signed-off-by: Wan Jiabing <[email protected]>
---
drivers/net/wireless/ath/ath9k/hif_usb.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index f06eec99de68..518deb5098a2 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -368,10 +368,9 @@ static int __hif_usb_tx(struct hif_device_usb *hif_dev)
__skb_queue_head_init(&tx_buf->skb_queue);
list_move_tail(&tx_buf->list, &hif_dev->tx.tx_buf);
hif_dev->tx.tx_buf_cnt++;
- }
-
- if (!ret)
+ } else {
TX_STAT_INC(buf_queued);
+ }

return ret;
}
--
2.35.1


2022-04-27 09:01:58

by Toke Høiland-Jørgensen

[permalink] [raw]
Subject: Re: [PATCH] ath9k: hif_usb: simplify if-if to if-else

Wan Jiabing <[email protected]> writes:

> Use if and else instead of if(A) and if (!A).
>
> Signed-off-by: Wan Jiabing <[email protected]>

Acked-by: Toke Høiland-Jørgensen <[email protected]>

2022-04-29 14:43:02

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] ath9k: hif_usb: simplify if-if to if-else

Wan Jiabing <[email protected]> wrote:

> Use if and else instead of if(A) and if (!A).
>
> Signed-off-by: Wan Jiabing <[email protected]>
> Acked-by: Toke Høiland-Jørgensen <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>

Patch applied to ath-next branch of ath.git, thanks.

2950833f10cf ath9k: hif_usb: simplify if-if to if-else

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

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