diff mbox series

wifi: ath12k: relax list iteration in ath12k_mac_vif_unref()

Message ID 20230704173718.73462-1-dmantipov@yandex.ru
State New
Headers show
Series wifi: ath12k: relax list iteration in ath12k_mac_vif_unref() | expand

Commit Message

Dmitry Antipov July 4, 2023, 5:37 p.m. UTC
In 'ath12k_mac_vif_unref()', 'dp->tx_desc_used_list[i]'
is not altered so 'list_for_each_entry()' should be safe.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 drivers/net/wireless/ath/ath12k/mac.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Kalle Valo Aug. 3, 2023, 9:17 a.m. UTC | #1
Dmitry Antipov <dmantipov@yandex.ru> wrote:

> In ath12k_mac_vif_unref() dp->tx_desc_used_list[i]
> is not altered so list_for_each_entry() should be safe.
> 
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

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

89a9dda1430a wifi: ath12k: relax list iteration in ath12k_mac_vif_unref()
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 1bb9802ef569..a58c374f23f7 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -5201,7 +5201,7 @@  static int ath12k_mac_op_add_interface(struct ieee80211_hw *hw,
 
 static void ath12k_mac_vif_unref(struct ath12k_dp *dp, struct ieee80211_vif *vif)
 {
-	struct ath12k_tx_desc_info *tx_desc_info, *tmp1;
+	struct ath12k_tx_desc_info *tx_desc_info;
 	struct ath12k_skb_cb *skb_cb;
 	struct sk_buff *skb;
 	int i;
@@ -5209,8 +5209,8 @@  static void ath12k_mac_vif_unref(struct ath12k_dp *dp, struct ieee80211_vif *vif
 	for (i = 0; i < ATH12K_HW_MAX_QUEUES; i++) {
 		spin_lock_bh(&dp->tx_desc_lock[i]);
 
-		list_for_each_entry_safe(tx_desc_info, tmp1, &dp->tx_desc_used_list[i],
-					 list) {
+		list_for_each_entry(tx_desc_info, &dp->tx_desc_used_list[i],
+				    list) {
 			skb = tx_desc_info->skb;
 			if (!skb)
 				continue;