From patchwork Fri Dec 30 18:06:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 37738 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3008526wrt; Fri, 30 Dec 2022 10:08:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXu5gztI2yeb7NfBcG1x3ybTeoTo8UR+qCwS6yKuG0dWj4aa8UT7reQhtmP4Y0P9KYD/wPEH X-Received: by 2002:a05:6a21:99a4:b0:a3:94cd:1435 with SMTP id ve36-20020a056a2199a400b000a394cd1435mr53437630pzb.38.1672423714378; Fri, 30 Dec 2022 10:08:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672423714; cv=none; d=google.com; s=arc-20160816; b=pCn5tHuL6hSO4/SoukU/Lu9t6/mK6dPG1AgZhk+EbDEPF8DegmlBZe0gthLrZjM0Ov blKjudJGtK8bkiJhnFq7GgnkpYvxJAu+NAVZkLKlghdOWrA4LGOtlK0JB37xlNHkt7gY L0Lh3S5EdRWFVqzQhUyPOFT6cjq1jsoM5sm0cnPn7XD1uBQZHKcv7FMyVlKXAk5IfLbI 7oovtomBDNx4JOrbw2170lcV1N1/dKPbSqw4bh810dmdc90Glb2qK7goCmBQt77pzt65 zkyneza1+6S6MQGBg93WZm4niilTVl9+nod+L4aa757TqLozuPSKNIRngq1giJC+2Zri lJtA== 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=YJkQyA5IeCM97a2hsDIdQ5WdaSjLghZDQusuBL/CRuQ=; b=eJw+hte6Zdog0uYHMHDJJkMMMGNnECLB4arAI4BgTXVXvS5NYs3HOoU9Ea/z/1YISj fFhSP212lQ6gXa3j6nHv2o+oc5vvOwiIHw5Rel9ZhS1T893k1CkmpioMltvS3sOts42d 6DyQNka4iXChT+GQP4EsmzbxOjUpWUvtUxndI9WLtYZFtj4rO9gcVUmGd6AzRJrSQ+UQ 9ngBvJJIneEgeawNHHx4ChBZ9t8lrdjK1RRkMmYFpcqXgKlBgmkMD0SUrROBGTwYxQD/ BTxl3EmMFGfFsgjN+v1WgZYpjnaVZTE/0YVIdL8JEaqLWR4/+HOLyOl0CuHZvmPI9WS4 ndkA== 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 e21-20020a637455000000b0046f3dfb97a5si23495739pgn.660.2022.12.30.10.08.21; Fri, 30 Dec 2022 10:08:34 -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 S235465AbiL3SH1 (ORCPT + 99 others); Fri, 30 Dec 2022 13:07:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235421AbiL3SHP (ORCPT ); Fri, 30 Dec 2022 13:07:15 -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 B505C60E2 for ; Fri, 30 Dec 2022 10:07:14 -0800 (PST) Received: from dslb-188-097-208-179.188.097.pools.vodafone-ip.de ([188.97.208.179] 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 1pBJmf-0004rR-Ve; Fri, 30 Dec 2022 19:07:10 +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 05/20] staging: r8188eu: remove unused parameter Date: Fri, 30 Dec 2022 19:06:31 +0100 Message-Id: <20221230180646.91008-6-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221230180646.91008-1-martin@kaiser.cx> References: <20221230180646.91008-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?1753663368935448519?= X-GMAIL-MSGID: =?utf-8?q?1753663368935448519?= All callers of rtl8188eu_xmitframe_complete set the pxmitbuf parameter to NULL, in which case rtl8188eu_xmitframe_complete allocates another xmit_buf internally. Remove the pxmitbuf parameter and resulting dead code. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/rtl8188eu_xmit.c | 12 +++++------- drivers/staging/r8188eu/hal/usb_ops_linux.c | 2 +- drivers/staging/r8188eu/include/rtl8188e_xmit.h | 3 +-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c index 6d1f56d1f9d7..cca74cf28915 100644 --- a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c +++ b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c @@ -375,11 +375,12 @@ static u32 xmitframe_need_length(struct xmit_frame *pxmitframe) return len; } -bool rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf) +bool rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitpriv) { struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(adapt); struct xmit_frame *pxmitframe = NULL; struct xmit_frame *pfirstframe = NULL; + struct xmit_buf *pxmitbuf; /* aggregate variable */ struct hw_xmit *phwxmit; @@ -403,12 +404,9 @@ bool rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmit else bulksize = USB_FULL_SPEED_BULK_SIZE; - /* check xmitbuffer is ok */ - if (!pxmitbuf) { - pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv); - if (!pxmitbuf) - return false; - } + pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv); + if (!pxmitbuf) + return false; /* 3 1. pick up first frame */ rtw_free_xmitframe(pxmitpriv, pxmitframe); diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c index 7c72f5e04d9b..c51f860d3527 100644 --- a/drivers/staging/r8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c @@ -494,7 +494,7 @@ void rtl8188eu_xmit_tasklet(unsigned long priv) (adapt->bWritePortCancel)) break; - ret = rtl8188eu_xmitframe_complete(adapt, pxmitpriv, NULL); + ret = rtl8188eu_xmitframe_complete(adapt, pxmitpriv); if (!ret) break; diff --git a/drivers/staging/r8188eu/include/rtl8188e_xmit.h b/drivers/staging/r8188eu/include/rtl8188e_xmit.h index 6db7fabebea9..865468d6b922 100644 --- a/drivers/staging/r8188eu/include/rtl8188e_xmit.h +++ b/drivers/staging/r8188eu/include/rtl8188e_xmit.h @@ -138,7 +138,6 @@ s32 rtl8188eu_xmit_buf_handler(struct adapter *padapter); #define hal_xmit_handler rtl8188eu_xmit_buf_handler void rtl8188eu_xmit_tasklet(unsigned long priv); bool rtl8188eu_xmitframe_complete(struct adapter *padapter, - struct xmit_priv *pxmitpriv, - struct xmit_buf *pxmitbuf); + struct xmit_priv *pxmitpriv); #endif /* __RTL8188E_XMIT_H__ */