linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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
Date: Wed, 14 Jun 2023 14:28:27 +0800	[thread overview]
Message-ID: <bef94b1701cd3a9718dff8aff1f4e7f4@208suo.com> (raw)
In-Reply-To: <a4bd77fc102a60ebac4e036842015eac@208suo.com>

Fix the following coccicheck warning:

drivers/net/wireless/realtek/rtw89/pci.c:239:5-8: Unneeded variable: 
"cnt".

Signed-off-by: Zhenggang Xuan <xuanzhenggang001@208suo.com>
---
  drivers/net/wireless/realtek/rtw89/pci.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)

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;

@@ -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,

      parent reply	other threads:[~2023-06-14  6:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230610131734.21134-1-denghuilong@cdjrlc.com>
     [not found] ` <a4bd77fc102a60ebac4e036842015eac@208suo.com>
2023-06-10 13:38   ` [PATCH] wifi: rtw89: Remove unneeded variable Kalle Valo
2023-06-14  6:28   ` xuanzhenggang001 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bef94b1701cd3a9718dff8aff1f4e7f4@208suo.com \
    --to=xuanzhenggang001@208suo.com \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).