From patchwork Mon Jan 23 20:53:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 47396 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1811798wrn; Mon, 23 Jan 2023 12:58:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXvyB95bl8ODk/DJc/D5dlJHLBDWXrch1P4DXu8Y2CzO1Z93HGoLHDjkFxwEB/6OtkpJ7Pab X-Received: by 2002:aa7:8819:0:b0:58d:a040:e6a9 with SMTP id c25-20020aa78819000000b0058da040e6a9mr27964658pfo.28.1674507523223; Mon, 23 Jan 2023 12:58:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674507523; cv=none; d=google.com; s=arc-20160816; b=dbLAe0hp6kh96oL5PTYLzRLHe+u8HTiP0IUbHbHi4R2SpqMAZlNlXohO2WjA9gCU8/ /EDM2KpQl2MooOnIAseeLpX7tFJLG7wZu58ZQ0zZfU2koDuiG+Uj6FIqIAVu/f8g/b99 cLf66xc7xrN1PyU2CrhxlcMb9Va2FkEauuewnCH9CjL6H15/TOoInq7R8ip7XMjCr0Av XgMn1aKi3BunTLTUWyzTYVae5ViSg+9jH8lzcD2sP9ivh48jcdYKL1SgQ4gHu7FruY6l EBCGbzmcy/B7vsjMoDtVjFykm17dfTyWsjpueuj+qUNxI1bcRhYKJGJ2Ax0hvfBnZYnl M4wg== 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=oN7ADI2/od/saEOXvHLHg7KLHSKXSoOqvy8at8GlQzQ=; b=YK539G3FZS2rqIMZo9UIEjsrLNAXnpQAXx7OQCCbmGWn97FV+R9RDm3WLOYfIDHwk4 D8lNPREJS2wHC1uVfqWkM1gTOoSOTk7VRHN216H06sOQ/yxRbzOPySXmEjPPxTjD5Unz yl1lPQPPXvOV72jRf7LSQiltjxyycnFMfQR39d/K7VITW9zV+QV4gncumZZiqSdMje7f VZwbN0cCrvTUTggPk0r6JDEvFJNnja2pdzfAMeeY0hD7rEB7onIuVOBIoEMA/Euxjlvd LhVGQ+XsYOf0sXlY3p6xbpSWPab5YKrbW/xSWPtchqLVvFAqSkfjc0BdbgRVign8bQF9 JEnw== 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 d201-20020a621dd2000000b005627f4b21absi52057pfd.296.2023.01.23.12.58.08; Mon, 23 Jan 2023 12:58:43 -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 S232143AbjAWU5d (ORCPT + 99 others); Mon, 23 Jan 2023 15:57:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232127AbjAWU5a (ORCPT ); Mon, 23 Jan 2023 15:57: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 D11333252B for ; Mon, 23 Jan 2023 12:57:18 -0800 (PST) Received: from ipservice-092-217-089-134.092.217.pools.vodafone-ip.de ([92.217.89.134] 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 1pK3pV-0000Lk-Kt; Mon, 23 Jan 2023 21:54:13 +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 23/23] staging: r8188eu: merge rtw_free_hwxmits into its only caller Date: Mon, 23 Jan 2023 21:53:42 +0100 Message-Id: <20230123205342.229589-24-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230123205342.229589-1-martin@kaiser.cx> References: <20230123205342.229589-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?1755848400518564459?= X-GMAIL-MSGID: =?utf-8?q?1755848400518564459?= rtw_free_hwxmits is called only by _rtw_free_xmit_priv. We can merge the two functions and make the code a bit shorter. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 11 +---------- drivers/staging/r8188eu/include/rtw_xmit.h | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 3752d4fddd11..f50e10f0d51f 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -281,7 +281,7 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv) vfree(pxmitpriv->pallocated_xmit_extbuf); - rtw_free_hwxmits(padapter); + kfree(pxmitpriv->hwxmits); mutex_destroy(&pxmitpriv->ack_tx_mutex); } @@ -1475,15 +1475,6 @@ int rtw_alloc_hwxmits(struct adapter *padapter) return 0; } -void rtw_free_hwxmits(struct adapter *padapter) -{ - struct hw_xmit *hwxmits; - struct xmit_priv *pxmitpriv = &padapter->xmitpriv; - - hwxmits = pxmitpriv->hwxmits; - kfree(hwxmits); -} - static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb) { struct sk_buff *skb = *pskb; diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index 33c3031de2c4..d8808e68f778 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -328,7 +328,6 @@ s32 rtw_txframes_sta_ac_pending(struct adapter *padapter, int _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter); void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv); int rtw_alloc_hwxmits(struct adapter *padapter); -void rtw_free_hwxmits(struct adapter *padapter); s32 rtw_xmit(struct adapter *padapter, struct sk_buff **pkt); int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_frame *pxmitframe);