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 4/6] staging: rtl8192e: Remove unchanged variable dig_algorithm_switch
Date: Fri, 13 Oct 2023 16:44:11 +0200	[thread overview]
Message-ID: <a76d8b86f2591446a071b4f614adf628b0fe5c93.1697127817.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1697127817.git.philipp.g.hortmann@gmail.com>

Remove variable dig_algorithm_switch as its value is set to 0 at
initialization. The equations result accordingly. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 18 ------------------
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.h |  2 --
 2 files changed, 20 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index e69c22e5d205..0bd9211500ac 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -911,8 +911,6 @@ static void _rtl92e_dm_dig_init(struct net_device *dev)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
 
-	dm_digtable.dig_algorithm_switch = 0;
-
 	dm_digtable.dig_state		= DM_STA_DIG_MAX;
 	dm_digtable.dig_highpwr_state	= DM_STA_DIG_MAX;
 	dm_digtable.cur_sta_connect_state = DIG_STA_DISCONNECT;
@@ -962,8 +960,6 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_driver(struct net_device *dev)
 	u8 i;
 	static u8	fw_dig;
 
-	if (dm_digtable.dig_algorithm_switch)
-		fw_dig = 0;
 	if (fw_dig <= 3) {
 		for (i = 0; i < 3; i++)
 			rtl92e_set_bb_reg(dev, UFWP, bMaskByte1, 0x8);
@@ -980,8 +976,6 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_driver(struct net_device *dev)
 	_rtl92e_dm_initial_gain(dev);
 	_rtl92e_dm_pd_th(dev);
 	_rtl92e_dm_cs_ratio(dev);
-	if (dm_digtable.dig_algorithm_switch)
-		dm_digtable.dig_algorithm_switch = 0;
 	dm_digtable.pre_sta_connect_state = dm_digtable.cur_sta_connect_state;
 }
 
@@ -991,10 +985,6 @@ static void _rtl92e_dm_initial_gain(struct net_device *dev)
 	u8 initial_gain = 0;
 	static u8 initialized, force_write;
 
-	if (dm_digtable.dig_algorithm_switch) {
-		initialized = 0;
-	}
-
 	if (rtllib_act_scanning(priv->rtllib, true)) {
 		force_write = 1;
 		return;
@@ -1040,10 +1030,6 @@ static void _rtl92e_dm_pd_th(struct net_device *dev)
 	struct r8192_priv *priv = rtllib_priv(dev);
 	static u8 initialized, force_write;
 
-	if (dm_digtable.dig_algorithm_switch) {
-		initialized = 0;
-	}
-
 	if (dm_digtable.pre_sta_connect_state == dm_digtable.cur_sta_connect_state) {
 		if (dm_digtable.cur_sta_connect_state == DIG_STA_CONNECT) {
 			if (dm_digtable.rssi_val >=
@@ -1100,10 +1086,6 @@ static void _rtl92e_dm_cs_ratio(struct net_device *dev)
 {
 	static u8 initialized, force_write;
 
-	if (dm_digtable.dig_algorithm_switch) {
-		initialized = 0;
-	}
-
 	if (dm_digtable.pre_sta_connect_state == dm_digtable.cur_sta_connect_state) {
 		if (dm_digtable.cur_sta_connect_state == DIG_STA_CONNECT) {
 			if (dm_digtable.rssi_val <= dm_digtable.rssi_low_thresh)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
index 15af490d2dcd..12b7d426b6b9 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
@@ -50,8 +50,6 @@
 
 /*------------------------------Define structure----------------------------*/
 struct dig_t {
-	u8		dig_algorithm_switch;
-
 	long		rssi_low_thresh;
 	long		rssi_high_thresh;
 
-- 
2.42.0


  parent reply	other threads:[~2023-10-13 14:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13 14:43 [PATCH 0/6] staging: rtl8192e: Remove unchanged variable dig_enable_flag Philipp Hortmann
2023-10-13 14:43 ` [PATCH 1/6] " Philipp Hortmann
2023-10-13 14:43 ` [PATCH 2/6] staging: rtl8192e: Remove unchanged variable dig_algorithm Philipp Hortmann
2023-10-13 14:44 ` [PATCH 3/6] staging: rtl8192e: Remove _rtl92e_dm_ctrl_initgain_byrssi_false_alarm() Philipp Hortmann
2023-10-13 14:44 ` Philipp Hortmann [this message]
2023-10-13 14:44 ` [PATCH 5/6] staging: rtl8192e: Remove unused variable dig_state Philipp Hortmann
2023-10-13 14:44 ` [PATCH 6/6] staging: rtl8192e: Remove unused enums dm_dig_sta and dm_dig_alg Philipp Hortmann
2023-10-13 15:17 ` [PATCH 0/6] staging: rtl8192e: Remove unchanged variable dig_enable_flag Dan Carpenter

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=a76d8b86f2591446a071b4f614adf628b0fe5c93.1697127817.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®