From patchwork Mon Jan 30 19:52:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 50446 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2367474wrn; Mon, 30 Jan 2023 11:58:11 -0800 (PST) X-Google-Smtp-Source: AK7set9x2dMCKNvfP+O8ifwPubgGfR047cMzD97C+blWPw/zoUAyrZDvSWfxCoIsXl8mLd/DmncM X-Received: by 2002:a17:903:3094:b0:196:6ec0:345a with SMTP id u20-20020a170903309400b001966ec0345amr7021007plc.25.1675108690964; Mon, 30 Jan 2023 11:58:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675108690; cv=none; d=google.com; s=arc-20160816; b=AmrJ3kBWT/DQMCnZ6xmNsWsvykiJZYOw1yjHV/1SZaHX8GWeH/PAY1SbHM/RG093G5 v1TmqK6EVme5eetWXCeSbPLJ6zRqg8uAJWsjApN0Gi0mBhecemz3S5LF0SfJPg81NxlB sk5UW6Hg8jtpzIgsdvS0xwZubNi8NTgXGe1EnqCXA6Fclks4Q8UIMhhIPi+gCl5rIDGv DHhHWt3HFEc+RVGojeGzvIKMBdWnitj0z7/iG+82P6F4Ys3h9RPJjA+66f3Nw5LagctE lNgjZdZGpExaJtt/NK7185dqNHV8i/XUSBaHsXS8KX8x4XlPbzZEKia4/KG8ECXfDLqR UWiQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=j/ACcYmFvvMe4osneDVUbWwcXLvNPKp5RXTycPKwdjM=; b=qlekh40O8K4DUsMvi47FXqzq5os06pJw5W4YLQYuq+PzT7UFHSomm+eKT0Pcnex5OK hHxel4RAV4J966/gKrCY+WOT94IU/ug+blXHHDk2ExY5m0msPWswdUsm6RSsBFRtPgFJ UJkJR8X7uT4LJ5FzBYS+W9IvYFrw9HZ4lo2T7zcw+xjQq3QP2YRpLQ9Qx2P2dBYDA0cn w3mfrhIlEKDG9EIJYqLChVrO6+c5640S6/3pNl+XG3M145NYRDRe2Un6E3nWIDcxsJ08 U5HhSHeRXRW3g5L/dpoEWALZQTSdP7YVsfsJbWXpzkP3S3Fahv7kIk9i2nCd1RVaOdSl uvMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x16-20020a170902ec9000b00186881688f9si15903887plg.276.2023.01.30.11.57.59; Mon, 30 Jan 2023 11:58:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237558AbjA3Tx2 (ORCPT + 99 others); Mon, 30 Jan 2023 14:53:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237621AbjA3TxZ (ORCPT ); Mon, 30 Jan 2023 14:53:25 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2667F46D78 for ; Mon, 30 Jan 2023 11:53:23 -0800 (PST) Received: from dslb-188-097-040-029.188.097.pools.vodafone-ip.de ([188.97.40.29] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pMaDN-0007S2-5D; Mon, 30 Jan 2023 20:53:17 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 1/9] staging: r8188eu: rtw_free_xmitframe_queue needs no spinlock Date: Mon, 30 Jan 2023 20:52:55 +0100 Message-Id: <20230130195303.138941-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230130195303.138941-1-martin@kaiser.cx> References: <20230130195303.138941-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756478771160912011?= X-GMAIL-MSGID: =?utf-8?q?1756478771160912011?= There's no need for a spinlock in rtw_free_xmitframe_queue. This function is called only from rtw_free_stainfo. rtw_free_stainfo holds pxmitpriv->lock during all rtw_free_xmitframe_queue calls. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index f50e10f0d51f..4e49f1d49eb5 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1330,8 +1330,6 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pfram struct list_head *plist, *phead; struct xmit_frame *pxmitframe; - spin_lock_bh(&pframequeue->lock); - phead = get_list_head(pframequeue); plist = phead->next; @@ -1342,7 +1340,6 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pfram rtw_free_xmitframe(pxmitpriv, pxmitframe); } - spin_unlock_bh(&pframequeue->lock); } struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit_i)