Skip to contentSkip to conversation

wifi: rtw89: Remove unneeded variable

PATCH New Kalle Valo 2 participants 2 messages Jun 10, 2023 – Jun 14, 2023 2 messages not in the archive Realtek wireless driver (rtw89)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Kalle Valo

author
#2 lore raw
Quoted 5 lines · [email protected] writes:

Fix the following coccicheck warning:

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

No HTML emails, please. I recommend using 'git send-email' tool for submitting patches, more info in the wiki below.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#3 lore raw

PATCH 1/1 wifi: rtw89: Remove unneeded variable

In reply to a message not in the archive

Fix the following coccicheck warning:

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

---
 drivers/net/wireless/realtek/rtw89/pci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/wireless/realtek/rtw89/pci.c +2 -3
index 9402f1a0caea..591b7b9a6eca 100644
@@ -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,