Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7596611rwl; Fri, 30 Dec 2022 10:50:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXvMsdwlj1EyRyTaZWUi5Z0+B73oLW3QRk/JiSfi3BJ4Hns8jBA3HdkxV9wZ3JOcvFANIn3G X-Received: by 2002:a17:903:32c3:b0:189:7819:e5c with SMTP id i3-20020a17090332c300b0018978190e5cmr49064056plr.6.1672426250514; Fri, 30 Dec 2022 10:50:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672426250; cv=none; d=google.com; s=arc-20160816; b=zcy7mp192fn74/jq22gfxr/qig2YsCv3IQLZpUTf9V+PF6UN8gBNJVTBX1yGgWf8a2 5wN3/Rha1XOgohZu6fcqEHO/xepe0zkjjXNfwqqQtSer0G3c/YlFDk4Mo4WXNfYoKvEu DR4eeLNwt91OBD4S4UXq86KMT8Bkw5G2HfTgFmK7W2lMzSgJclf9n9FB/gP4tS6Xulps myvize5vNhY0VcqS3a/z5msK62r9Vuh+zWql2wsbP29IyjNGJKhZP1zpuSlqw49x3v0a mYaR0SU/nzHqwrETQBPXO+HB6QTSsyLValrUsnJcsLXcq50USCw1M/WbWlmId6KTVpqO 3hTA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bc5-20020a170902930500b00189659458a3si21266696plb.455.2022.12.30.10.50.17; Fri, 30 Dec 2022 10:50:50 -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 + 63 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 Content-Transfer-Encoding: 8bit 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 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__ */ -- 2.30.2