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) From patchwork Mon Jan 30 19:52:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 50443 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2367323wrn; Mon, 30 Jan 2023 11:57:46 -0800 (PST) X-Google-Smtp-Source: AK7set/NkBwmvkuLTDTSJoCKi1gr7OV1CdScBU/RGv9/1d7uflawTrIZS3AAt4ye/yFd9Mx/9eoh X-Received: by 2002:a17:903:3012:b0:196:3853:2926 with SMTP id o18-20020a170903301200b0019638532926mr16124224pla.9.1675108666267; Mon, 30 Jan 2023 11:57:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675108666; cv=none; d=google.com; s=arc-20160816; b=ePBzpLJsEx48JQB62WJBkR4d2wI13ZZaGOVSHx/WwpEIaY+BBKiKm5SEMwoIZAwez/ gSQV1x+4RKsT81RE0X7dVBciX3hikRdodrdnlrYqV9pYAZAh9qSeftn8sTc7OBwtWB/e zwgAUFw4F6rZ4yHNgaFeGqdadk9AWHMQ4I4dVR7RsMTuwOvFmnUQxqCjZFnUpchvJ7Ft YvmqSDdOtFvf/no3LahcfiXGZYlFAonCWcriOJT8hTlbY/FE/5RY34QEHWucekMAPXyf hTTAv2G2a9iOA/R4FsxVD/9FJtUW8kwm5uzcEbNEo59RRFit4PJLfrkDaz+l9zml2JkI laQg== 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=+ARaniFDDFcPbwrQ9i4G6DulD6qm4S6fwN/MsxxmP2k=; b=SCERbLdqsRi70JCxfpYxi83NBvEyFtGfMfgPBo86AMryyDtkZf5YVkhy43IQaJCcFF Qy2tz1t4+c1VOxMBP+MPIojKz2ckzA0YocrIMQDyYn+Y9reb9OGq+rylVG568TrMp0eY WK3YZ3u/CKnqWD3M0gt4b7rYRq3mGre3aNVzJyPpzZluhlgONbaBnUMEnVnZm6qscY4b yy8mrPbAYzgiMX7ZUAH0XwCJk4OAOPek9X6/uQKSF+stFiqkcyfSC0esC0eeHCIhjCyU jX7irGM99jcSWetwY3JQjLxTZj6L/666EREA724ycBAfdbsxbArM6/QuewFy/MDmZdTF KBPQ== 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 l4-20020a170902f68400b0019663019e60si10479645plg.174.2023.01.30.11.57.34; Mon, 30 Jan 2023 11:57:46 -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 S237887AbjA3Txc (ORCPT + 99 others); Mon, 30 Jan 2023 14:53:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237635AbjA3TxZ (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 1F4093F283 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-Sm; 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 2/9] staging: r8188eu: change function param from __queue to list_head Date: Mon, 30 Jan 2023 20:52:56 +0100 Message-Id: <20230130195303.138941-3-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?1756478744576584729?= X-GMAIL-MSGID: =?utf-8?q?1756478744576584729?= Modify the dequeue_xmitframes_to_sleeping_queue function to take a list_head pointer instead of a __queue pointer. This is an intermediate step towards changing struct tx_servq's sta_pending from __queue to list_head. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 4e49f1d49eb5..3117db41d749 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1788,16 +1788,15 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra return ret; } -static void dequeue_xmitframes_to_sleeping_queue(struct adapter *padapter, struct sta_info *psta, struct __queue *pframequeue) +static void dequeue_xmitframes_to_sleeping_queue(struct adapter *padapter, struct sta_info *psta, struct list_head *phead) { - struct list_head *plist, *phead; + struct list_head *plist; u8 ac_index; struct tx_servq *ptxservq; struct pkt_attrib *pattrib; struct xmit_frame *pxmitframe; struct hw_xmit *phwxmits = padapter->xmitpriv.hwxmits; - phead = get_list_head(pframequeue); plist = phead->next; while (phead != plist) { @@ -1834,21 +1833,21 @@ void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta) pstapriv->sta_dz_bitmap |= BIT(psta->aid); - dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vo_q.sta_pending); + dequeue_xmitframes_to_sleeping_queue(padapter, psta, get_list_head(&pstaxmitpriv->vo_q.sta_pending)); list_del_init(&pstaxmitpriv->vo_q.tx_pending); - dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vi_q.sta_pending); + dequeue_xmitframes_to_sleeping_queue(padapter, psta, get_list_head(&pstaxmitpriv->vi_q.sta_pending)); list_del_init(&pstaxmitpriv->vi_q.tx_pending); - dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->be_q.sta_pending); + dequeue_xmitframes_to_sleeping_queue(padapter, psta, get_list_head(&pstaxmitpriv->be_q.sta_pending)); list_del_init(&pstaxmitpriv->be_q.tx_pending); - dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->bk_q.sta_pending); + dequeue_xmitframes_to_sleeping_queue(padapter, psta, get_list_head(&pstaxmitpriv->bk_q.sta_pending)); list_del_init(&pstaxmitpriv->bk_q.tx_pending); /* for BC/MC Frames */ pstaxmitpriv = &psta_bmc->sta_xmitpriv; - dequeue_xmitframes_to_sleeping_queue(padapter, psta_bmc, &pstaxmitpriv->be_q.sta_pending); + dequeue_xmitframes_to_sleeping_queue(padapter, psta_bmc, get_list_head(&pstaxmitpriv->be_q.sta_pending)); list_del_init(&pstaxmitpriv->be_q.tx_pending); spin_unlock_bh(&pxmitpriv->lock); From patchwork Mon Jan 30 19:52:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 50444 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2367358wrn; Mon, 30 Jan 2023 11:57:53 -0800 (PST) X-Google-Smtp-Source: AK7set/qJSWph/3Y1mPCJ1x7sKbzZDazGpPGIm3AQOWPkmGe0mz0gRAHacTa1puJ/QHtrK8VP6Nl X-Received: by 2002:a05:6a20:1592:b0:be:d1a0:3dde with SMTP id h18-20020a056a20159200b000bed1a03ddemr375896pzj.30.1675108673649; Mon, 30 Jan 2023 11:57:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675108673; cv=none; d=google.com; s=arc-20160816; b=YH01PxZNWM87XhcFBWav9WGK0U/OSEm1sDUNXO5I0/VFySv/OWoxAMmMhVYGHS8t0v wdAeeJYYwguYngkJcAi4XLnYDE1mDelmcMf4NlvkWxn+Paorvxz6QtABUerowWVtWy/3 s72YJnIDIUwg7ev9OfapkAzM+CUIek8jtU20jqlFbuuQvmL9mFnCtD20jPnMHH+h3jF+ x8PMbKi2pL6IVY5X40gxGWW1JJtyARvK0yiWRsTwHNvD/IOOJgSdyOKvFgKiHnke91cK GrniD2pZTtVpFTkuHNuStryvFbl+NJMgoLFS7opW53TRDj5CJCVwluy13FCU2JkPkwyh LS3w== 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=faxbOtbEaIX9Qc/6vYGIQSSgz2Je16S8n1L6jcmgybU=; b=oP8JFJ2AFKkhi2SwUcB6DTZVTP3AtLK1ke48oVbVQq+UAF32yS3nh1WIoZ66s0w7hB PJI/tIMEvpoO+goQ3wLPEHZmSvhzsNfSBgJ+YJoZldWQdf/2cUifc0CDXg3Vf4xlZ8Yy n8skcfyExiKcjYhal9rlPEutdtY3erVbsRRS3uYTpL/PewmpZl2BlaXhdviJ+RJo9n// lLD30tepDs44Q8vWBV55JzWxElHnBp7YWwLcNuoxJXqyYvnyweLTJ9VYJZKVgEspaxOS LaAQlc0HSAg5fbqVE37FpTlFFCKrB9Ec0ws9zZ/7EwsgP1gs9JMBUn3ISHyvpgbKGtC0 Z5VA== 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 g9-20020a63ad09000000b004e850715fa1si4610405pgf.529.2023.01.30.11.57.40; Mon, 30 Jan 2023 11:57:53 -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 S238015AbjA3Txf (ORCPT + 99 others); Mon, 30 Jan 2023 14:53:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237710AbjA3Tx1 (ORCPT ); Mon, 30 Jan 2023 14:53:27 -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 F116246D45 for ; Mon, 30 Jan 2023 11:53:24 -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 1pMaDO-0007S2-Jq; Mon, 30 Jan 2023 20:53:18 +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 3/9] staging: r8188eu: change another function param from __queue to list_head Date: Mon, 30 Jan 2023 20:52:57 +0100 Message-Id: <20230130195303.138941-4-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?1756478752689646049?= X-GMAIL-MSGID: =?utf-8?q?1756478752689646049?= Modify the rtw_free_xmitframe_queue function to take a list_head pointer instead of a __queue pointer. This is an intermediate step towards changing struct tx_servq's sta_pending from __queue to list_head. Now that the function takes a list instead of a queue, we should also rename it to rtw_free_xmitframe_list. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_sta_mgt.c | 10 +++++----- drivers/staging/r8188eu/core/rtw_xmit.c | 9 ++++----- drivers/staging/r8188eu/include/rtw_xmit.h | 3 +-- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r8188eu/core/rtw_sta_mgt.c index b4aee8623099..49a92725c5ed 100644 --- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c +++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c @@ -260,22 +260,22 @@ void rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta) spin_lock_bh(&pxmitpriv->lock); - rtw_free_xmitframe_queue(pxmitpriv, &psta->sleep_q); + rtw_free_xmitframe_list(pxmitpriv, get_list_head(&psta->sleep_q)); psta->sleepq_len = 0; - rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->vo_q.sta_pending); + rtw_free_xmitframe_list(pxmitpriv, get_list_head(&pstaxmitpriv->vo_q.sta_pending)); list_del_init(&pstaxmitpriv->vo_q.tx_pending); - rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->vi_q.sta_pending); + rtw_free_xmitframe_list(pxmitpriv, get_list_head(&pstaxmitpriv->vi_q.sta_pending)); list_del_init(&pstaxmitpriv->vi_q.tx_pending); - rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->bk_q.sta_pending); + rtw_free_xmitframe_list(pxmitpriv, get_list_head(&pstaxmitpriv->bk_q.sta_pending)); list_del_init(&pstaxmitpriv->bk_q.tx_pending); - rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->be_q.sta_pending); + rtw_free_xmitframe_list(pxmitpriv, get_list_head(&pstaxmitpriv->be_q.sta_pending)); list_del_init(&pstaxmitpriv->be_q.tx_pending); diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 3117db41d749..d272166a99ec 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1325,15 +1325,14 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram return _SUCCESS; } -void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pframequeue) +void rtw_free_xmitframe_list(struct xmit_priv *pxmitpriv, struct list_head *xframe_list) { - struct list_head *plist, *phead; + struct list_head *plist; struct xmit_frame *pxmitframe; - phead = get_list_head(pframequeue); - plist = phead->next; + plist = xframe_list->next; - while (phead != plist) { + while (xframe_list != plist) { pxmitframe = container_of(plist, struct xmit_frame, list); plist = plist->next; diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index d8808e68f778..8557b311e809 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -309,8 +309,7 @@ s32 rtw_put_snap(u8 *data, u16 h_proto); struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv); s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframe); -void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, - struct __queue *pframequeue); +void rtw_free_xmitframe_list(struct xmit_priv *pxmitpriv, struct list_head *xframe_list); struct tx_servq *rtw_get_sta_pending(struct adapter *padapter, struct sta_info *psta, int up, u8 *ac); struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, From patchwork Mon Jan 30 19:52:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 50445 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2367386wrn; Mon, 30 Jan 2023 11:57:58 -0800 (PST) X-Google-Smtp-Source: AK7set/pOaNQSYBZyr1GdvEIS4eb9PYF+P1R6aT1ho8c8rTmDYE6M8LMauC+Jf54Pr2uExWv3S+a X-Received: by 2002:a05:6a00:17a4:b0:593:befd:848c with SMTP id s36-20020a056a0017a400b00593befd848cmr6429094pfg.16.1675108678180; Mon, 30 Jan 2023 11:57:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675108678; cv=none; d=google.com; s=arc-20160816; b=Jf5nlWkXYj0IIpd6kAEhZc9gzpr3au9zfvf7RxbsB41WSmKhBDt4emWFR1eoTwUEbn c055B/Qz+xMY/Hhe33KsB2BIKGSaixH29rJs1ecjBOfBUxTr77QKwB/dB0lMSXNerYa8 iItkMD9YRDB1CG61ZQO+kTQMGnI2kR7TQ0W4wXBVs/9xBQ/joy7KjhO4j31XPjmCXaMj qvHM/mmPYf7+OgT6/iSWMiCvsd8Oc/6bm+vQQuglMvzHLBSX6ZDWQzmxrHy8Wxj8rWrl QtSvCI28P/yjk1qr29aruj5swfnk22d5ZlXiRh1QHY9RkE9sU7u/i/8RnC7qtCiWVvVa 74Fg== 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=OkD0ChBgHj3uA8OjERInWPje9qd61Y08zbFRK2nIFZ0=; b=XvnreV+lHoxnB8PK2c3/KeVfxKi1RevQUtwbbN+a9/1n501WIY+h88PrHDBvkvrbkA ylpsmWEw5j5JZ3lupysa/RogKTofuIbm5fJkOcI5AcSfGqpYAIc8JhqMz3Id2cuo2t2+ EVRRXe7AbVbxCz3AhKNPlLgB8cc3sw4MgWr+4M+C8Z1yv/LQX1pQ/NEsYKHr+97W/lpl DlUyPkV7wIM8w6Nr9tojCG2fGsw4qATvLUFOlrTRPv39Y4wy3ebV/gpQK+Wy7+744eEX lbTlfxT6G6ly+UgPgAq5vofbMyzVCiMSKb0jXPNBPZJwSOpKF7DEfbdOLhgBQuIR/dMl eaMA== 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 t13-20020a62d14d000000b0059069de3461si14145450pfl.72.2023.01.30.11.57.45; Mon, 30 Jan 2023 11:57:58 -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 S238051AbjA3Txj (ORCPT + 99 others); Mon, 30 Jan 2023 14:53:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237681AbjA3Tx1 (ORCPT ); Mon, 30 Jan 2023 14:53:27 -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 F05FA46739 for ; Mon, 30 Jan 2023 11:53:24 -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 1pMaDP-0007S2-82; Mon, 30 Jan 2023 20:53:19 +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 4/9] staging: r8188eu: make sta_pending a list_head Date: Mon, 30 Jan 2023 20:52:58 +0100 Message-Id: <20230130195303.138941-5-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?1756478757457168056?= X-GMAIL-MSGID: =?utf-8?q?1756478757457168056?= We can now change sta_pending in struct tx_servq from __queue to list_head. The driver defines __queue as list_head + spinlock, the spinlock is not used for sta_pending. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_sta_mgt.c | 8 ++++---- drivers/staging/r8188eu/core/rtw_xmit.c | 16 ++++++++-------- drivers/staging/r8188eu/hal/rtl8188eu_xmit.c | 4 ++-- drivers/staging/r8188eu/include/rtw_xmit.h | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r8188eu/core/rtw_sta_mgt.c index 49a92725c5ed..a9c29b2bf230 100644 --- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c +++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c @@ -263,19 +263,19 @@ void rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta) rtw_free_xmitframe_list(pxmitpriv, get_list_head(&psta->sleep_q)); psta->sleepq_len = 0; - rtw_free_xmitframe_list(pxmitpriv, get_list_head(&pstaxmitpriv->vo_q.sta_pending)); + rtw_free_xmitframe_list(pxmitpriv, &pstaxmitpriv->vo_q.sta_pending); list_del_init(&pstaxmitpriv->vo_q.tx_pending); - rtw_free_xmitframe_list(pxmitpriv, get_list_head(&pstaxmitpriv->vi_q.sta_pending)); + rtw_free_xmitframe_list(pxmitpriv, &pstaxmitpriv->vi_q.sta_pending); list_del_init(&pstaxmitpriv->vi_q.tx_pending); - rtw_free_xmitframe_list(pxmitpriv, get_list_head(&pstaxmitpriv->bk_q.sta_pending)); + rtw_free_xmitframe_list(pxmitpriv, &pstaxmitpriv->bk_q.sta_pending); list_del_init(&pstaxmitpriv->bk_q.tx_pending); - rtw_free_xmitframe_list(pxmitpriv, get_list_head(&pstaxmitpriv->be_q.sta_pending)); + rtw_free_xmitframe_list(pxmitpriv, &pstaxmitpriv->be_q.sta_pending); list_del_init(&pstaxmitpriv->be_q.tx_pending); diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index d272166a99ec..24cf11e7b4bc 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -17,7 +17,7 @@ static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 }; static void _init_txservq(struct tx_servq *ptxservq) { INIT_LIST_HEAD(&ptxservq->tx_pending); - rtw_init_queue(&ptxservq->sta_pending); + INIT_LIST_HEAD(&ptxservq->sta_pending); ptxservq->qcnt = 0; } @@ -1361,7 +1361,7 @@ struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi for (i = 0; i < HWXMIT_ENTRY; i++) { phwxmit = phwxmit_i + inx[i]; list_for_each_entry_safe(ptxservq, tmp_txservq, phwxmit->sta_list, tx_pending) { - xframe_list = get_list_head(&ptxservq->sta_pending); + xframe_list = &ptxservq->sta_pending; if (list_empty(xframe_list)) continue; @@ -1444,7 +1444,7 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe) if (list_empty(&ptxservq->tx_pending)) list_add_tail(&ptxservq->tx_pending, phwxmits[ac_index].sta_list); - list_add_tail(&pxmitframe->list, get_list_head(&ptxservq->sta_pending)); + list_add_tail(&pxmitframe->list, &ptxservq->sta_pending); ptxservq->qcnt++; phwxmits[ac_index].accnt++; exit: @@ -1832,21 +1832,21 @@ void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta) pstapriv->sta_dz_bitmap |= BIT(psta->aid); - dequeue_xmitframes_to_sleeping_queue(padapter, psta, get_list_head(&pstaxmitpriv->vo_q.sta_pending)); + dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vo_q.sta_pending); list_del_init(&pstaxmitpriv->vo_q.tx_pending); - dequeue_xmitframes_to_sleeping_queue(padapter, psta, get_list_head(&pstaxmitpriv->vi_q.sta_pending)); + dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vi_q.sta_pending); list_del_init(&pstaxmitpriv->vi_q.tx_pending); - dequeue_xmitframes_to_sleeping_queue(padapter, psta, get_list_head(&pstaxmitpriv->be_q.sta_pending)); + dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->be_q.sta_pending); list_del_init(&pstaxmitpriv->be_q.tx_pending); - dequeue_xmitframes_to_sleeping_queue(padapter, psta, get_list_head(&pstaxmitpriv->bk_q.sta_pending)); + dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->bk_q.sta_pending); list_del_init(&pstaxmitpriv->bk_q.tx_pending); /* for BC/MC Frames */ pstaxmitpriv = &psta_bmc->sta_xmitpriv; - dequeue_xmitframes_to_sleeping_queue(padapter, psta_bmc, get_list_head(&pstaxmitpriv->be_q.sta_pending)); + dequeue_xmitframes_to_sleeping_queue(padapter, psta_bmc, &pstaxmitpriv->be_q.sta_pending); list_del_init(&pstaxmitpriv->be_q.tx_pending); spin_unlock_bh(&pxmitpriv->lock); diff --git a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c index 18557738dbad..5aa33fc4041d 100644 --- a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c +++ b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c @@ -461,7 +461,7 @@ bool rtl8188eu_xmitframe_complete(struct adapter *adapt) } spin_lock_bh(&pxmitpriv->lock); - xmitframe_phead = get_list_head(&ptxservq->sta_pending); + xmitframe_phead = &ptxservq->sta_pending; xmitframe_plist = xmitframe_phead->next; while (xmitframe_phead != xmitframe_plist) { @@ -512,7 +512,7 @@ bool rtl8188eu_xmitframe_complete(struct adapter *adapt) } } /* end while (aggregate same priority and same DA(AP or STA) frames) */ - if (list_empty(&ptxservq->sta_pending.queue)) + if (list_empty(&ptxservq->sta_pending)) list_del_init(&ptxservq->tx_pending); spin_unlock_bh(&pxmitpriv->lock); diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index 8557b311e809..dfdc1c57d5d4 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -221,7 +221,7 @@ struct xmit_frame { struct tx_servq { struct list_head tx_pending; - struct __queue sta_pending; + struct list_head sta_pending; int qcnt; }; From patchwork Mon Jan 30 19:52:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 50449 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2367738wrn; Mon, 30 Jan 2023 11:58:50 -0800 (PST) X-Google-Smtp-Source: AK7set/UquJaSImki5zl7JISk1SPBR2CnrL33ctk+3wcglqhIcCvq8tjavatETAgr9sZOaE2mtoC X-Received: by 2002:a17:902:c412:b0:196:82a0:4187 with SMTP id k18-20020a170902c41200b0019682a04187mr6360236plk.36.1675108729805; Mon, 30 Jan 2023 11:58:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675108729; cv=none; d=google.com; s=arc-20160816; b=WFX+EQC7dklQrShQyYjigZ9xBabQi8hZocsMC9nh7e3wIkYNih8W1j4rSLNz95+WAf jafDhiWrsMuEFViFYgrNIc3hsOylRGjRcsVzC+rVNwCYKZ6mfStVkvjyjAGDlUHk+g2Y ZjYJJRGwEh61LUuoGAUkaJBSSFPqJaswliiDHyCJZ0rmFV7ZLq+PYVfHG0mANqjvMTtq GpCkEPsfZSuLdVs60gDgCbvjkQEY0wpi7nJgyi71PZUQwwbpIUfk4kqZkne8bGNl3cr0 K6jnVieDWom9LwY0arj+Vz0s0nSYfmywQ7vSqsBBcR21gitPO54vV6hB5G1sqcu8jH2U pfow== 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=MJLdLYfV0nlkv8oAH+Z9EZhjveMWq9QUWlNjIZBuW48=; b=F+nHwZ81UX0zkKLS383vYe/jN/8SYQ+WHbRWB42Wrfhf9uQyBDwwruvNuf5PYIxQly 5ygp9HP6MkMViSe7uA9evIo/dLEH9UX6dr532fJR7+XJzgcVGfUG5DsxIHuEEDnB98P2 Pt41E+aQeTZ1cImCZmrA/v5D6QDH74AkmFrFnAxWDac/Jc4t+qeeVPXXWuaWIB2VsH0N s9L8oYvaBbMyVxfKgtb2OzK9VASj9/j8/h0hgVL/aVxDJQ8L+dmpRQrz3eayICog1YpV VUX9q0I0K6UgwfDqS7QSnXeOR4mx8183DUUtG7GkjYGiGW9Nopsa3HHDEVWtT4kFODXG mnBA== 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 p3-20020a056a000b4300b0058bb1210a20si3636961pfo.85.2023.01.30.11.58.37; Mon, 30 Jan 2023 11:58:49 -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 S237953AbjA3Txl (ORCPT + 99 others); Mon, 30 Jan 2023 14:53:41 -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 S237556AbjA3Tx1 (ORCPT ); Mon, 30 Jan 2023 14:53:27 -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 101F54ED3 for ; Mon, 30 Jan 2023 11:53:25 -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 1pMaDP-0007S2-VE; Mon, 30 Jan 2023 20:53:20 +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 5/9] staging: r8188eu: use kernel helper to iterate over a list Date: Mon, 30 Jan 2023 20:52:59 +0100 Message-Id: <20230130195303.138941-6-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?1756478811416255572?= X-GMAIL-MSGID: =?utf-8?q?1756478811416255572?= rtw_free_xmitframe_list iterates over the list of xmit_frames and frees each entry. We can use list_for_each_entry_safe instead of coding this manually. We need the _safe version as the current pxmitframe will be removed from the list by rtw_free_xmitframe. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 24cf11e7b4bc..c2b1e6f1d358 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1327,18 +1327,10 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram void rtw_free_xmitframe_list(struct xmit_priv *pxmitpriv, struct list_head *xframe_list) { - struct list_head *plist; - struct xmit_frame *pxmitframe; - - plist = xframe_list->next; - - while (xframe_list != plist) { - pxmitframe = container_of(plist, struct xmit_frame, list); - - plist = plist->next; + struct xmit_frame *pxmitframe, *tmp_xmitframe; + list_for_each_entry_safe(pxmitframe, tmp_xmitframe, xframe_list, list) rtw_free_xmitframe(pxmitpriv, pxmitframe); - } } struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit_i) From patchwork Mon Jan 30 19:53:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 50450 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2367789wrn; Mon, 30 Jan 2023 11:59:04 -0800 (PST) X-Google-Smtp-Source: AK7set+zuohTNZmIAZYvXOuukaAPfcSne26HkKWTjqjxRcB5bGdkZ4VGwQUzg1jC88sNqvCS8n6w X-Received: by 2002:a05:6a00:15c9:b0:593:af2e:b872 with SMTP id o9-20020a056a0015c900b00593af2eb872mr8758511pfu.2.1675108743786; Mon, 30 Jan 2023 11:59:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675108743; cv=none; d=google.com; s=arc-20160816; b=lXYis0JeIPpWeTCQGcuxl7DIQN8ByAWHgl0FoKZSPmre5lshrf3XfkDUCMrmDGHTOL hI9Ae8YCQWAAChHzGlHY4M3DjxHqsDhhrw31DiLl4QriIPeM0tPyxNOHjp/E4zF01m6a iHlbPURRWZoUBV7f8B1kjCmx8GywGQuE7mPn6vC1xxu3a3s25ZvxMEAlxZGjwEWDR5Xu 0IxSNmvwr9hovIILPbVkMMZMSnupAJHDcc7k2gey6QZ3Mp2YGHJtRv9jilQtDafdQGtU q3DIBYnjx4afI3HX5QkP9Kwifs5UdY3aubgdihw2Srpqcev2U/CjitBP2y+jrFBT4K20 12vg== 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=3KjOOYoKBxi3bNLulqc2oy7nGXE2pt/kNqStMsMqhcg=; b=R1M2mmDyk4zpjdq8vKy4T8/Whq8svn+NBiCLZG1uzVSLOoCUfzgGhmEcw66m1sP6k8 /uRBxBovODwGIOpphanCKp+mtcTUz0ae8IBNCq0plf71sljAXA0mYXNkiU3G3Yhtmofm hwpfE/694Xq1FT459fD/VaxyZMw87Hk+aW8Hb9ykXvnUVxQ1uggKB3yPDBA9xpooEnF4 Nmd/5waFlwVZNSPG9LvF1ju/JhdDeGMsFfI08A7hlktN/6yZh/g0Iwo1mI33LaSKJ0w1 B1LhKhZjaGmZM3K8jWWiSuW7wO8oQhMS0ACagQ4HttYyArnGuJuSzL4UZzuWb8yBcM9B bg6A== 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 g13-20020a056a0023cd00b0059038315e75si14552162pfc.33.2023.01.30.11.58.52; Mon, 30 Jan 2023 11:59:03 -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 S238040AbjA3Txv (ORCPT + 99 others); Mon, 30 Jan 2023 14:53:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237818AbjA3Txa (ORCPT ); Mon, 30 Jan 2023 14:53:30 -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 DC4A53F283 for ; Mon, 30 Jan 2023 11:53:28 -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 1pMaDQ-0007S2-Lc; Mon, 30 Jan 2023 20:53:20 +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 6/9] staging: r8188eu: legacy_dz is initialised but never used Date: Mon, 30 Jan 2023 20:53:00 +0100 Message-Id: <20230130195303.138941-7-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?1756478826370113696?= X-GMAIL-MSGID: =?utf-8?q?1756478826370113696?= legacy_dz in struct sta_xmit_priv is initialised but not used. It can be removed. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 1 - drivers/staging/r8188eu/include/rtw_xmit.h | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index c2b1e6f1d358..797e24b852b1 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -29,7 +29,6 @@ void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv) _init_txservq(&psta_xmitpriv->bk_q); _init_txservq(&psta_xmitpriv->vi_q); _init_txservq(&psta_xmitpriv->vo_q); - INIT_LIST_HEAD(&psta_xmitpriv->legacy_dz); INIT_LIST_HEAD(&psta_xmitpriv->apsd); } diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index dfdc1c57d5d4..8566e731514c 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -232,7 +232,6 @@ struct sta_xmit_priv { struct tx_servq bk_q; /* priority == 1,2 */ struct tx_servq vi_q; /* priority == 4,5 */ struct tx_servq vo_q; /* priority == 6,7 */ - struct list_head legacy_dz; struct list_head apsd; u16 txseq_tid[16]; }; From patchwork Mon Jan 30 19:53:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 50447 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2367671wrn; Mon, 30 Jan 2023 11:58:39 -0800 (PST) X-Google-Smtp-Source: AK7set8H41EgnNzoYAp4fwwttjFM9Szz0lrXym6a+paXYfh/uFg7vJv3QABCna4E3und8zo4aEsv X-Received: by 2002:a17:90b:1b0e:b0:228:f21b:a3ff with SMTP id nu14-20020a17090b1b0e00b00228f21ba3ffmr10855525pjb.42.1675108718898; Mon, 30 Jan 2023 11:58:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675108718; cv=none; d=google.com; s=arc-20160816; b=vwVQkmsjBuCcxSVG4jjfEm8zix+9FPdLySnAZ/K5VNz+6qvsRm+LrHoCxYefYVF0Ar BGrn9K9RBjMI6o3b6N9uhynjGjPyzrYtwc/d0IeDBuxJ1c0TV/S8wYwhMhvPaw8neLVK 4/0rPjDbUsdsopKmeEcNCs1gjYAL1Ub7E3d5jiptcGS2Jrk/gWR77ONy8KMPh3qly5SC 4hrCynZFryec3Sp66zhnTvCvgW1rYJSP4c1PEvvTkeI1dxgLRjWuvZvGWs67QEATZ07V 3e8oh9UX5Qb1BMP8TE6BcviJk6sse8NHiqOxUAQJJnt16Z5L8YWqMMe+lK1MmLBzdzS+ +fGw== 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=zePtYmyKJbbudNnw62+UQ2jkeTnKOEnyOlF4NSO8EB0=; b=KNd34LXIV/kbaoNyXqKfO2AJ8PWC7IxuYUmemDroaDnhusqqVfFgTLIxYiggJYi7zY vJCK4o+h8rzP6Ubt6mGknZLT1BCfq9Nf65J7dq/nYoP4tcrebrnqJvEGbk1MStAbis5F ajeViqPgEmq2EIsOMAGF2/haT3w2ncTUg9cr3zMCQYFlyNX1TvIXRfONYXPbvAyLBSik nGE4zdMZUyYxQVrHbFlCdsFnjtvCpGAk5X60AGODKfsyGTQi4foix2sUAQ0WalUivukC E5eq5Pg6OtzYRMvASpoxvLRWL7IhhFKmp7Wr78BJNnjx00j5303OxathNr1a24b6G2g/ SZ+w== 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 l3-20020a17090a408300b0022955e2f7ccsi12840020pjg.21.2023.01.30.11.58.26; Mon, 30 Jan 2023 11:58:38 -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 S237942AbjA3Txo (ORCPT + 99 others); Mon, 30 Jan 2023 14:53:44 -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 S236427AbjA3Tx3 (ORCPT ); Mon, 30 Jan 2023 14:53:29 -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 86D05E040 for ; Mon, 30 Jan 2023 11:53:26 -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 1pMaDR-0007S2-Bn; Mon, 30 Jan 2023 20:53:21 +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 7/9] staging: r8188eu: apsd is initialised but never used Date: Mon, 30 Jan 2023 20:53:01 +0100 Message-Id: <20230130195303.138941-8-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?1756478800185318235?= X-GMAIL-MSGID: =?utf-8?q?1756478800185318235?= apsd in struct sta_xmit_priv is initialised but not used. It can be removed. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 1 - drivers/staging/r8188eu/include/rtw_xmit.h | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 797e24b852b1..91f92ec5ef69 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -29,7 +29,6 @@ void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv) _init_txservq(&psta_xmitpriv->bk_q); _init_txservq(&psta_xmitpriv->vi_q); _init_txservq(&psta_xmitpriv->vo_q); - INIT_LIST_HEAD(&psta_xmitpriv->apsd); } static int rtw_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf, diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index 8566e731514c..4c508ab4c870 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -232,7 +232,6 @@ struct sta_xmit_priv { struct tx_servq bk_q; /* priority == 1,2 */ struct tx_servq vi_q; /* priority == 4,5 */ struct tx_servq vo_q; /* priority == 6,7 */ - struct list_head apsd; u16 txseq_tid[16]; }; From patchwork Mon Jan 30 19:53:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 50448 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2367716wrn; Mon, 30 Jan 2023 11:58:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXtA1+b9zPCc6zJTFlpUJl498SLDHPrrsNqa9owogrT9GTj8duf9DL3nbYo2dkH+MfamLVYX X-Received: by 2002:a05:6a20:b71c:b0:b4:f66a:99a9 with SMTP id fg28-20020a056a20b71c00b000b4f66a99a9mr47513098pzb.60.1675108726433; Mon, 30 Jan 2023 11:58:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675108726; cv=none; d=google.com; s=arc-20160816; b=n3Mb4xYgubFaS+GZcNLRa/4cqm18UeFfPV3KoDMx9rNueoc2T/X6p2l+bAp1Co3tdb F9INkgLCqJVF1i0rW18/5e+N7r2wPhi/7Q/DmEf9k/zkZkTa96eKgU4EnvpvSzRuNXAq BP5pmHCoJeaAU2F+QTEGBj+JM+7OLJqftPIKXd91vFnr4W4BSOh0POq3I3RumcIqyffN 8J+QA2xo2l6GyxWytuhKg/jpPiKQlSZZpr80ZxGifu+hZB3aIOGxWrk8FO61rcpCMXEV cvYW9m/YzXO/+ygMWo06oZShnlQqpy1GqV9jt1egonITzAMtvRT72FT2dLM/UD5j4+E6 avaw== 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=8dtyiPiv6jPMEtvAs7DbJbkIdAr1u0gNzQqXeW2t/F8=; b=gNfEDnfao85VaJ9a/LSS4xcjY9uGbXNoKlGHKGVBldvOsT68S5v1g8WkwGrFbmqMCD D9AGW7p7oMRiXVbc8GaHmQ1fGtMzNyZOCy9iQZ6k0qRn8QHVEuBG7gZifbi2g35EWjSx gUSpjZvvdEJV8CqmVjPl2i5OROzZKW0Vq75M4ogNkQhdPsNYX/+VC0bCpbwV3v7mhKJj xZQNPHVE2EntS2AuE7EH2guM+aWOgzdBDr2OXl6mU3/0J8Ydigs2j7Lm9QAByF+J6a5R YI0S42+fVScDVCX7YEVfUmhc/cJUQvR9ofsnT4EHRZZmcQAA78LQeTD3rFbdQwMmA/lp i9pg== 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 d66-20020a633645000000b0048be2671cd0si13245756pga.170.2023.01.30.11.58.33; Mon, 30 Jan 2023 11:58:46 -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 S238273AbjA3Txr (ORCPT + 99 others); Mon, 30 Jan 2023 14:53:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237666AbjA3Tx3 (ORCPT ); Mon, 30 Jan 2023 14:53:29 -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 59C474671D for ; Mon, 30 Jan 2023 11:53:27 -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 1pMaDS-0007S2-27; Mon, 30 Jan 2023 20:53:22 +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 8/9] staging: r8188eu: option in struct sta_xmit_priv is not used Date: Mon, 30 Jan 2023 20:53:02 +0100 Message-Id: <20230130195303.138941-9-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?1756478808234713084?= X-GMAIL-MSGID: =?utf-8?q?1756478808234713084?= The option component in struct sta_xmit_priv is not used, remove it. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/rtw_xmit.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index 4c508ab4c870..b332c2a86dbb 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -227,7 +227,6 @@ struct tx_servq { struct sta_xmit_priv { spinlock_t lock; - int option; struct tx_servq be_q; /* priority == 0,3 */ struct tx_servq bk_q; /* priority == 1,2 */ struct tx_servq vi_q; /* priority == 4,5 */ From patchwork Mon Jan 30 19:53:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 50451 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2367803wrn; Mon, 30 Jan 2023 11:59:07 -0800 (PST) X-Google-Smtp-Source: AK7set8yWYGtONtk0klkWPMfNQmJu7Wd0gR1ppMdXt5N7cTkxYJHKvplSeV2hVH/VDQ24VlJyRTt X-Received: by 2002:a05:6a20:6992:b0:bc:f035:4536 with SMTP id t18-20020a056a20699200b000bcf0354536mr7464421pzk.8.1675108746724; Mon, 30 Jan 2023 11:59:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675108746; cv=none; d=google.com; s=arc-20160816; b=DHoWO3NgLpJ8G5RDD0fFendqXHcBsPPvMGLZIL97hBe+cFO894e03ftQQq298XoS5S 2+ml0cCw7N4YLL2w7GkDRKn6KddiEY23N63DX+sjbGhb3v88DMOPXLLa95Fe4jozi3mK 6xwQtRJSzZrHMRwsW+LwPHxpTUJ9NsJh4GwDK7dyaDZ1cQ75Q7/S76X8PiNVJ0RnPip1 4Rp8Zf1KWo5S6T/jIJVZbVeP95WfZm3AZVcNrfsw4j9grF8YLhKDAtlwoxFgwlv/TtM5 USZ0jQBL5RZRhIHx7+UodzUrh+M2Rze50dmyB4qG+lvVJHXwCXIww55uji3xmgIozoiM 9Glg== 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=+uaeG1bCMEjFHyRxcgB3iq8q/OOhDkABwQYluU1q5bw=; b=h8PPlCVj9G2ys/Wm7IXvIeKVVxKXjpVRrycsnsaJrhgRL8Do/52XgezH6NAOpEE4iE MWf8uTSmlYYAR1xUod5k5O9bFPuesGeRCUucZHoRs9aOf6N6MibK8yT5zxFs9OXK5srm jsU4wZEzkkycM3vEzJ4nH8fv2qFu+exzi+MVvXH6obcvtjjXhc6N9rq++VIkvG2wqPBN vagW6yM1uZo7uLIJGlq2GIfS0PM0pXLucg2ZMsBcx5j3pdBD8SV2JP7Q+qkdjQMe6GpW JoopwhcMOSmUnvP0FlceKmfUqfsyJV3gBeX2SssoWTpUjaDYKqo3ZYsKxGY7wNjO9tkf iziQ== 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 bs65-20020a632844000000b00478e15039c0si12916561pgb.779.2023.01.30.11.58.54; Mon, 30 Jan 2023 11:59:06 -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 S238235AbjA3Txy (ORCPT + 99 others); Mon, 30 Jan 2023 14:53:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237949AbjA3Txb (ORCPT ); Mon, 30 Jan 2023 14:53:31 -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 93F04CDC2 for ; Mon, 30 Jan 2023 11:53:29 -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 1pMaDS-0007S2-Q6; Mon, 30 Jan 2023 20:53:22 +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 9/9] staging: r8188eu: replace switch-case with if Date: Mon, 30 Jan 2023 20:53:03 +0100 Message-Id: <20230130195303.138941-10-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?1756478829181349727?= X-GMAIL-MSGID: =?utf-8?q?1756478829181349727?= Replace a switch-case in rtw_write_port with an if statement and make the code a bit shorter. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/os_dep/usb_ops_linux.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c index c9ee1173a1d6..48c96f731ce1 100644 --- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c @@ -121,14 +121,8 @@ u32 rtw_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem) status = usb_submit_urb(purb, GFP_ATOMIC); if (status) { rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_WRITE_PORT_ERR); - - switch (status) { - case -ENODEV: + if (status == -ENODEV) padapter->bDriverStopped = true; - break; - default: - break; - } goto exit; }