From patchwork Wed Jun 14 06:28:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: xuanzhenggang001@208suo.com X-Patchwork-Id: 13279561 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00FAFEB64DB for ; Wed, 14 Jun 2023 06:28:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242677AbjFNG2d (ORCPT ); Wed, 14 Jun 2023 02:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234691AbjFNG2c (ORCPT ); Wed, 14 Jun 2023 02:28:32 -0400 Received: from mail.208.org (unknown [183.242.55.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2B92199 for ; Tue, 13 Jun 2023 23:28:30 -0700 (PDT) Received: from mail.208.org (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTP id 4QgwV41cNtzBQgpD for ; Wed, 14 Jun 2023 14:28:28 +0800 (CST) Authentication-Results: mail.208.org (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=208.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=208.org; h= content-transfer-encoding:content-type:message-id:user-agent :references:in-reply-to:subject:to:from:date:mime-version; s= dkim; t=1686724108; x=1689316109; bh=uzV5IRMvn+xjooRI4ST/VUkNmJE 0mM4D/yBYv59E2J4=; b=OEMPUrdH+ElMTwD2vHZWY4u1D16Vyz9lew1NmE97VQT BPrKK3SeywTLBuWEFUijFPcs/5tFhE8gck3rt/3FbWXIXQ/inKkb8IdcaDDhTBJZ UVl5iTacfGd7dMGPjtRm5avZWcMIhUOa3k7VO9Y9ibjhn7irMo1sbShaQZS63Ii6 vTWQ1TI5dPaua4b3JA/p4rHUDyPVzMFekEqu4t9thOtNrlii9i2xbNVf1B9Osl4y AkWdQLxH3lRXkbLYpciy+EEFp28oNYkYLuq8TSO0sIYGq5OkULtJH35F4dJkMSGe G6zkgkRxf5aWuIlCWyWF7FpsBEkTVU9sltgtlipk8FQ== X-Virus-Scanned: amavisd-new at mail.208.org Received: from mail.208.org ([127.0.0.1]) by mail.208.org (mail.208.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id I5-MmUHcWlR0 for ; Wed, 14 Jun 2023 14:28:28 +0800 (CST) Received: from localhost (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTPSA id 4QgwV36l4GzBQgpC; Wed, 14 Jun 2023 14:28:27 +0800 (CST) MIME-Version: 1.0 Date: Wed, 14 Jun 2023 14:28:27 +0800 From: xuanzhenggang001@208suo.com To: pkshih@realtek.com, kvalo@kernel.org Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] wifi: rtw89: Remove unneeded variable In-Reply-To: References: <20230610131734.21134-1-denghuilong@cdjrlc.com> User-Agent: Roundcube Webmail Message-ID: X-Sender: xuanzhenggang001@208suo.com Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fix the following coccicheck warning: drivers/net/wireless/realtek/rtw89/pci.c:239:5-8: Unneeded variable: "cnt". Signed-off-by: Zhenggang Xuan --- drivers/net/wireless/realtek/rtw89/pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) @@ -297,7 +296,7 @@ static u32 rtw89_pci_rxbd_deliver_skbs(struct rtw89_dev *rtwdev, desc_info->ready = false; } - return cnt; + return 1; err_sync_device: rtw89_pci_sync_skb_for_device(rtwdev, skb); @@ -308,7 +307,7 @@ static u32 rtw89_pci_rxbd_deliver_skbs(struct rtw89_dev *rtwdev, rx_ring->diliver_skb = NULL; desc_info->ready = false; - return cnt; + return 1; } static void rtw89_pci_rxbd_deliver(struct rtw89_dev *rtwdev, diff --git a/drivers/net/wireless/realtek/rtw89/pci.c b/drivers/net/wireless/realtek/rtw89/pci.c index 9402f1a0caea..591b7b9a6eca 100644 --- a/drivers/net/wireless/realtek/rtw89/pci.c +++ b/drivers/net/wireless/realtek/rtw89/pci.c @@ -236,7 +236,6 @@ static u32 rtw89_pci_rxbd_deliver_skbs(struct rtw89_dev *rtwdev, struct sk_buff *skb; u32 rxinfo_size = sizeof(struct rtw89_pci_rxbd_info); u32 offset; - u32 cnt = 1; bool fs, ls; int ret;