Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28002773rwd; Tue, 4 Jul 2023 11:05:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6d+1XxkrRZS5giaSDb3R4jCGEgy6aZa/fL/Zvm4OngtB+0WZJf006JAvDJIT9WPsd7KkC8 X-Received: by 2002:a05:6870:42ce:b0:1aa:1c3f:808 with SMTP id z14-20020a05687042ce00b001aa1c3f0808mr15195471oah.55.1688493906236; Tue, 04 Jul 2023 11:05:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688493906; cv=none; d=google.com; s=arc-20160816; b=ZNZtLgp4ALxPFyGGuF/Nh8PwsRlpXvZZ745GuDQ2BpxkPZ/nQQz6L8va5dcpeWTucG 84xyz9sPw9Rdx/PhNk4RZCVdmuNwqqIjN4AnMiPbFvRji3ArbJc4W1yokSG9eF9YzNNt JxplXNH9ND8g8yWOvQMMUA3owLObIHzeHboYH+tXJNyAgS3Xh3P60Z+DiZ9QNl/pK0vG WebBR2D0f7HAgKvXLSyWDIarg+mM+GhLI3IQccmWPvHE+8SgZVV+1I15JoFQI61xE4bx PKUKySbEQwOBKinMwl5CRKklRKDW3J+aAJRaxaV3l0mRZf3OnKFx5mXr+RGTrAzCzgv/ mVQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gbYg+lFLvg7+x8qiBmJOV1lCnuPpK7be9jfNm+8ZynA=; fh=BnILszgCJyWcb3K7WG3TE9K5XgKwfdDNxTJXcDnfIKU=; b=jtwyoM2zCSqXAmceyrRLMXXn9IIVODQ3j6oYpnBpuAER/1y/OE3t5qySIR6LVkCZ56 YvRXGBspKoXaLETNKeWr3SfvZ7QMmhHe5Q8VmSUOdMVT267DXs068dTjfLHOcyl9HkJ0 cv51vs42NKesw9LJ5be/x4iHgA/Yhjm2qy4q10Z2dP7/3wWmVS89WxPHB3OrHBl7eMlq Az2Kpd+Ski8BqqZN/ESHX+bevHjL0a/qTMdPUtj+QpXG1XOFtBFB9EL1im4CHR80SEbi hkBN6EmvH75KKCQPAFaspP+3nIfkJ3LVHy9BrEw3FdyW75bAPl3CEyc9924o36c+zeqj mMOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b="TWeSNr/o"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ls8-20020a17090b350800b00263b83d06a5si6535068pjb.41.2023.07.04.11.04.53; Tue, 04 Jul 2023 11:05:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b="TWeSNr/o"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230349AbjGDRh0 (ORCPT + 59 others); Tue, 4 Jul 2023 13:37:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230011AbjGDRhY (ORCPT ); Tue, 4 Jul 2023 13:37:24 -0400 Received: from forward101a.mail.yandex.net (forward101a.mail.yandex.net [178.154.239.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEE3E10D7 for ; Tue, 4 Jul 2023 10:37:22 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-68.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-68.vla.yp-c.yandex.net [IPv6:2a02:6b8:c0f:99b:0:640:5ae0:0]) by forward101a.mail.yandex.net (Yandex) with ESMTP id 7479A46C85; Tue, 4 Jul 2023 20:37:20 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-68.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id JbWSfGGDViE0-MWC7JUU3; Tue, 04 Jul 2023 20:37:20 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1688492240; bh=gbYg+lFLvg7+x8qiBmJOV1lCnuPpK7be9jfNm+8ZynA=; h=Message-ID:Date:Cc:Subject:To:From; b=TWeSNr/oSiTqZNZe2hCUYLKsOfhEGXNeKUGbSgsuhmKYyy2p9i2ZyeqPMutpZi7MI I1RsmAPiiJJMAnEKKXKuxzstmt2+gEtlX9H6p7c6kfNu8sXHc27ZcdH7QdEZE36Uhy twl0Ake5PoxZqaadUNTWGx/QJEdL5BfAcNw4CXWM= Authentication-Results: mail-nwsmtp-smtp-production-main-68.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru From: Dmitry Antipov To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Dmitry Antipov Subject: [PATCH] wifi: ath12k: relax list iteration in ath12k_mac_vif_unref() Date: Tue, 4 Jul 2023 20:37:12 +0300 Message-ID: <20230704173718.73462-1-dmantipov@yandex.ru> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- drivers/net/wireless/ath/ath12k/mac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.41.0