mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 11/11] staging: rtl8192e: Remove unused variables txbytes.., txbyt.. and signa..
Date: Tue, 24 Jan 2023 23:04:37 +0100	[thread overview]
Message-ID: <bbfa1eb95b90476a5df40651343e3976e7742e5d.1674596722.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1674596722.git.philipp.g.hortmann@gmail.com>

txbytesmulticast, txbytesbroadcast and signal_quality are initialized and
increased or set but never read. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 1 -
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c   | 6 +-----
 drivers/staging/rtl8192e/rtl8192e/rtl_core.h   | 3 ---
 3 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 154d15b68b8e..7616486bb1ec 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1619,7 +1619,6 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 
 			tmp_val = priv->stats.slide_evm_total /
 				  slide_evm_statistics;
-			priv->stats.signal_quality = tmp_val;
 			priv->stats.last_signal_strength_inpercent = tmp_val;
 		}
 
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 2c5edda74e73..f8a8ece40ac1 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1616,11 +1616,7 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb)
 	type = WLAN_FC_GET_TYPE(fc);
 	pda_addr = header->addr1;
 
-	if (is_broadcast_ether_addr(pda_addr))
-		priv->stats.txbytesbroadcast += skb->len - fwinfo_size;
-	else if (is_multicast_ether_addr(pda_addr))
-		priv->stats.txbytesmulticast += skb->len - fwinfo_size;
-	else
+	if (!is_broadcast_ether_addr(pda_addr) && !is_multicast_ether_addr(pda_addr))
 		priv->stats.txbytesunicast += skb->len - fwinfo_size;
 
 	spin_lock_irqsave(&priv->irq_th_lock, flags);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index c6a4ac6ce959..4cf776094ac0 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -184,8 +184,6 @@ enum reset_type {
 
 struct rt_stats {
 	unsigned long received_rate_histogram[4][32];
-	unsigned long txbytesmulticast;
-	unsigned long txbytesbroadcast;
 	unsigned long txbytesunicast;
 	unsigned long rxbytesunicast;
 	unsigned long txretrycount;
@@ -195,7 +193,6 @@ struct rt_stats {
 	unsigned long	slide_rssi_total;
 	unsigned long slide_evm_total;
 	long signal_strength;
-	long signal_quality;
 	long last_signal_strength_inpercent;
 	long	recv_signal_power;
 	u8 rx_rssi_percentage[4];
-- 
2.39.1


      parent reply	other threads:[~2023-01-24 22:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24 22:02 [PATCH 00/11] staging: rtl8192e: Remove unused variables from struct rt_stats Philipp Hortmann
2023-01-24 22:03 ` [PATCH 01/11] staging: rtl8192e: Remove unused variables rxrdu and rxok Philipp Hortmann
2023-01-24 22:03 ` [PATCH 02/11] staging: rtl8192e: Remove unused variables rxdatacrcerr and rxmgmtcrcerr Philipp Hortmann
2023-01-24 22:03 ` [PATCH 03/11] staging: rtl8192e: Remove unused variables rxcrcerrmin and friends Philipp Hortmann
2023-01-24 22:03 ` [PATCH 04/11] staging: rtl8192e: Remove unused variables numpacket.. and received_pre Philipp Hortmann
2023-01-24 23:32   ` kernel test robot
2023-01-25  7:56   ` kernel test robot
2023-01-24 22:03 ` [PATCH 05/11] staging: rtl8192e: Remove unused variables numqry_ Philipp Hortmann
2023-01-24 22:03 ` [PATCH 06/11] staging: rtl8192e: Remove unused variables num_proc.., recei.. and rxov Philipp Hortmann
2023-01-25  0:13   ` kernel test robot
2023-01-25 10:09   ` kernel test robot
2023-01-24 22:04 ` [PATCH 07/11] staging: rtl8192e: Remove unused variables rxint, ints and shints Philipp Hortmann
2023-01-24 22:04 ` [PATCH 08/11] staging: rtl8192e: Remove unused variables txov.., txbeokint and txbkokint Philipp Hortmann
2023-01-24 22:04 ` [PATCH 09/11] staging: rtl8192e: Remove unused variables txviok.., txvook.. and txbea Philipp Hortmann
2023-01-24 22:04 ` [PATCH 10/11] staging: rtl8192e: Remove unused variables txbeac.., txman.. and txcmdp Philipp Hortmann
2023-01-24 22:04 ` Philipp Hortmann [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=bbfa1eb95b90476a5df40651343e3976e7742e5d.1674596722.git.philipp.g.hortmann@gmail.com \
    --to=philipp.g.hortmann@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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

all inboxes | Powered by JetHome®