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 03/10] staging: rtl8192e: Remove unused variable rxSNRdB
Date: Sun, 29 Jan 2023 15:58:14 +0100	[thread overview]
Message-ID: <b3150d506556375c4b155c51eabf79e128f50780.1675003608.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1675003608.git.philipp.g.hortmann@gmail.com>

rxSNRdB is initialized and set but never read. Remove dead code. Local
variable rx_snrX is then of no use. Remove rx_snrX as well. Local
variable tmp_rxsnr is then of no use. Remove tmp_rxsnr as well.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 912b50d3fb31..1677b6c5d363 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1297,9 +1297,9 @@ static void _rtl92e_query_rxphystatus(
 	struct phy_sts_ofdm_819xpci *pofdm_buf;
 	struct phy_sts_cck_819xpci *pcck_buf;
 	u8 *prxpkt;
-	u8 i, max_spatial_stream, tmp_rxsnr, tmp_rxevm;
+	u8 i, max_spatial_stream, tmp_rxevm;
 	s8 rx_pwr[4], rx_pwr_all = 0;
-	s8 rx_snrX, rx_evmX;
+	s8 rx_evmX;
 	u8 evm, pwdb_all;
 	u32 RSSI, total_rssi = 0;
 	u8 is_cck_rate = 0;
@@ -1419,11 +1419,6 @@ static void _rtl92e_query_rxphystatus(
 			rx_pwr[i] = ((pofdm_buf->trsw_gain_X[i] & 0x3F) *
 				     2) - 110;
 
-			tmp_rxsnr = pofdm_buf->rxsnr_X[i];
-			rx_snrX = (s8)(tmp_rxsnr);
-			rx_snrX /= 2;
-			priv->stats.rxSNRdB[i] = (long)rx_snrX;
-
 			RSSI = rtl92e_rx_db_to_percent(rx_pwr[i]);
 			if (priv->brfpath_rxenable[i])
 				total_rssi += RSSI;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index a5812dfcd614..d0c88d68b60b 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -197,7 +197,6 @@ struct rt_stats {
 	long	recv_signal_power;
 	u8 rx_rssi_percentage[4];
 	u8 rx_evm_percentage[2];
-	long rxSNRdB[4];
 	u32 slide_beacon_pwdb[100];
 	u32 slide_beacon_total;
 	u32	CurrentShowTxate;
-- 
2.39.1


  parent reply	other threads:[~2023-01-29 14:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-29 14:57 [PATCH 00/10] staging: rtl8192e: Remove unused constants and variables from r8192E_hw.h Philipp Hortmann
2023-01-29 14:57 ` [PATCH 01/10] staging: rtl8192e: Rename TxBBGainTab.., CCKTxBBGainTab.. and RT_CID_81 Philipp Hortmann
2023-01-29 14:58 ` [PATCH 02/10] staging: rtl8192e: Rename sCrcLng Philipp Hortmann
2023-01-29 14:58 ` Philipp Hortmann [this message]
2023-01-29 14:58 ` [PATCH 04/10] staging: rtl8192e: Remove unused constants from enum rt_customer_id Philipp Hortmann
2023-01-29 14:58 ` [PATCH 05/10] staging: rtl8192e: Rename BaseBand_Config_PHY_REG and BaseBand_Config_AGC_TAB Philipp Hortmann
2023-01-29 14:58 ` [PATCH 06/10] staging: rtl8192e: Remove unused constants at beginning of r8192E_hw.h Philipp Hortmann
2023-01-29 14:58 ` [PATCH 07/10] staging: rtl8192e: Remove unused constants in _RTL8192Pci_HW Philipp Hortmann
2023-01-29 14:58 ` [PATCH 08/10] staging: rtl8192e: Remove used constants MSR_LINK_SH.. and MSR_LINK_N Philipp Hortmann
2023-01-29 14:58 ` [PATCH 09/10] staging: rtl8192e: Rename _RTL8192Pci_HW, MXDMA2_NoLimit and TPPoll Philipp Hortmann
2023-01-29 14:59 ` [PATCH 10/10] staging: rtl8192e: Rename TPPoll_CQ, AcmHwCtrl and AcmHw_BeqEn Philipp Hortmann

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=b3150d506556375c4b155c51eabf79e128f50780.1675003608.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®