All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Whitmore <johnfwhitmore@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
	John Whitmore <johnfwhitmore@gmail.com>
Subject: [PATCH v2 09/15] staging:rtl8192u: Remove enum dm_dig_op_e - Style
Date: Sun, 29 Jul 2018 22:07:41 +0100	[thread overview]
Message-ID: <20180729210747.10803-10-johnfwhitmore@gmail.com> (raw)
In-Reply-To: <20180729210747.10803-1-johnfwhitmore@gmail.com>

Remove the enumerated type dm_dig_op_e. The type is only used as a
parameter to the function dm_change_dynamic_initgain_thresh(), but
that function is never referenced in the code at all.

I would consider this to be a coding style change as the function is
never referenced and as a result the enumeration is never used. In
any case there should be no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_dm.c | 91 ----------------------------
 drivers/staging/rtl8192u/r8192U_dm.h | 20 ------
 2 files changed, 111 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index c4e4e3ba394b..16dbe55d0e15 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -1613,97 +1613,6 @@ static void dm_bb_initialgain_backup(struct net_device *dev)
 }   /* dm_BBInitialGainBakcup */
 
 #endif
-/*-----------------------------------------------------------------------------
- * Function:	dm_change_dynamic_initgain_thresh()
- *
- * Overview:
- *
- * Input:		NONE
- *
- * Output:		NONE
- *
- * Return:		NONE
- *
- * Revised History:
- *	When		Who		Remark
- *	05/29/2008	amy		Create Version 0 porting from windows code.
- *
- *---------------------------------------------------------------------------*/
-
-void dm_change_dynamic_initgain_thresh(struct net_device *dev, u32 dm_type,
-				       u32 dm_value)
-{
-	switch (dm_type) {
-	case DIG_TYPE_THRESH_HIGH:
-		dm_digtable.rssi_high_thresh = dm_value;
-		break;
-
-	case  DIG_TYPE_THRESH_LOW:
-		dm_digtable.rssi_low_thresh = dm_value;
-		break;
-
-	case  DIG_TYPE_THRESH_HIGHPWR_HIGH:
-		dm_digtable.rssi_high_power_highthresh = dm_value;
-		break;
-
-	case DIG_TYPE_THRESH_HIGHPWR_LOW:
-		dm_digtable.rssi_high_power_lowthresh = dm_value;
-		break;
-
-	case DIG_TYPE_ENABLE:
-		dm_digtable.dig_state		= DM_STA_DIG_MAX;
-		dm_digtable.dig_enable_flag	= true;
-		break;
-
-	case DIG_TYPE_DISABLE:
-		dm_digtable.dig_state		= DM_STA_DIG_MAX;
-		dm_digtable.dig_enable_flag	= false;
-		break;
-
-	case DIG_TYPE_DBG_MODE:
-		if (dm_value >= DM_DBG_MAX)
-			dm_value = DM_DBG_OFF;
-		dm_digtable.dbg_mode		= (u8)dm_value;
-		break;
-
-	case DIG_TYPE_RSSI:
-		if (dm_value > 100)
-			dm_value = 30;
-		dm_digtable.rssi_val			= (long)dm_value;
-		break;
-
-	case DIG_TYPE_ALGORITHM:
-		if (dm_value >= DIG_ALGO_MAX)
-			dm_value = DIG_ALGO_BY_FALSE_ALARM;
-		if (dm_digtable.dig_algorithm != (u8)dm_value)
-			dm_digtable.dig_algorithm_switch = 1;
-		dm_digtable.dig_algorithm	= (u8)dm_value;
-		break;
-
-	case DIG_TYPE_BACKOFF:
-		if (dm_value > 30)
-			dm_value = 30;
-		dm_digtable.backoff_val		= (u8)dm_value;
-		break;
-
-	case DIG_TYPE_RX_GAIN_MIN:
-		if (dm_value == 0)
-			dm_value = 0x1;
-		dm_digtable.rx_gain_range_min = (u8)dm_value;
-		break;
-
-	case DIG_TYPE_RX_GAIN_MAX:
-		if (dm_value > 0x50)
-			dm_value = 0x50;
-		dm_digtable.rx_gain_range_max = (u8)dm_value;
-		break;
-
-	default:
-		break;
-	}
-
-}	/* DM_ChangeDynamicInitGainThresh */
-
 /*-----------------------------------------------------------------------------
  * Function:	dm_dig_init()
  *
diff --git a/drivers/staging/rtl8192u/r8192U_dm.h b/drivers/staging/rtl8192u/r8192U_dm.h
index d7bd257a7e93..471609819e08 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.h
+++ b/drivers/staging/rtl8192u/r8192U_dm.h
@@ -105,24 +105,6 @@ struct dig {
 	long		rssi_val;
 };
 
-/* 2007/10/11 MH Define DIG operation type. */
-typedef enum tag_dynamic_init_gain_operation_type_definition {
-	DIG_TYPE_THRESH_HIGH	= 0,
-	DIG_TYPE_THRESH_LOW	= 1,
-	DIG_TYPE_THRESH_HIGHPWR_HIGH	= 2,
-	DIG_TYPE_THRESH_HIGHPWR_LOW	= 3,
-	DIG_TYPE_DBG_MODE				= 4,
-	DIG_TYPE_RSSI						= 5,
-	DIG_TYPE_ALGORITHM				= 6,
-	DIG_TYPE_BACKOFF					= 7,
-	DIG_TYPE_PWDB_FACTOR			= 8,
-	DIG_TYPE_RX_GAIN_MIN				= 9,
-	DIG_TYPE_RX_GAIN_MAX				= 10,
-	DIG_TYPE_ENABLE			= 20,
-	DIG_TYPE_DISABLE		= 30,
-	DIG_OP_TYPE_MAX
-} dm_dig_op_e;
-
 typedef enum tag_dig_algorithm_definition {
 	DIG_ALGO_BY_FALSE_ALARM = 0,
 	DIG_ALGO_BY_RSSI	= 1,
@@ -209,8 +191,6 @@ void init_rate_adaptive(struct net_device *dev);
 void dm_txpower_trackingcallback(struct work_struct *work);
 void dm_restore_dynamic_mechanism_state(struct net_device *dev);
 void dm_backup_dynamic_mechanism_state(struct net_device *dev);
-void dm_change_dynamic_initgain_thresh(struct net_device *dev,
-				       u32 dm_type, u32 dm_value);
 void dm_force_tx_fw_info(struct net_device *dev,
 			 u32 force_type, u32 force_value);
 void dm_init_edca_turbo(struct net_device *dev);
-- 
2.18.0


  parent reply	other threads:[~2018-07-29 21:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-29 21:07 [PATCH v2 00/15] staging:rtl8192u: Coding style changes John Whitmore
2018-07-29 21:07 ` [PATCH v2 01/15] staging:rtl8192u: Remove typedef of struct cmpk_txfb_t - Style John Whitmore
2018-07-30  9:11   ` Greg KH
2018-07-30 18:43     ` John Whitmore
2018-07-29 21:07 ` [PATCH v2 02/15] staging:rtl8192u: Remove unused CMPK_TX_SET_CONFIG_SIZE " John Whitmore
2018-07-29 21:07 ` [PATCH v2 03/15] staging:rtl8192u: Removed unused CMPK_RX_DBG_MSG_SIZE " John Whitmore
2018-07-29 21:07 ` [PATCH v2 04/15] staging:rtl8192u: Correct spelling in comments - style John Whitmore
2018-07-29 21:07 ` [PATCH v2 05/15] staging:rtl8192u: Remove typedef of cmpk_intr_sta_t - Style John Whitmore
2018-07-29 21:07 ` [PATCH v2 06/15] staging:rtl8192u: Remove typedef of cmpk_set_cfg_t " John Whitmore
2018-07-29 21:07 ` [PATCH v2 07/15] staging:rtl8192u: Refactor use of enum dm_dig_sta_e " John Whitmore
2018-07-29 21:07 ` [PATCH v2 08/15] staging:rtl8192u: Refactor enum dm_ratr_sta_e usage " John Whitmore
2018-07-29 21:07 ` John Whitmore [this message]
2018-07-29 21:07 ` [PATCH v2 10/15] staging:rtl8192u: Refactor enum dm_dig_alg_e " John Whitmore
2018-07-29 21:07 ` [PATCH v2 11/15] staging:rtl8192u: Remove unused enum dm_dig_dbg_e " John Whitmore
2018-07-29 21:07 ` [PATCH v2 12/15] staging:rtl8192u: Refactor dm_dig_connect_e " John Whitmore
2018-07-29 21:07 ` [PATCH v2 13/15] staging:rtl8192u: Refactor enum dm_dig_pd_th_e " John Whitmore
2018-07-29 21:07 ` [PATCH v2 14/15] staging:rtl8192u: Refactor enum dm_dig_cs_ratio_e " John Whitmore
2018-07-29 21:07 ` [PATCH v2 15/15] staging:rtl8192u: Refactor enum DM_CCK_Rx_Path_Method " John Whitmore

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=20180729210747.10803-10-johnfwhitmore@gmail.com \
    --to=johnfwhitmore@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.