staging:rtl8192u: Remove enum dm_dig_op_e - Style
authorJohn Whitmore <johnfwhitmore@gmail.com>
Sun, 29 Jul 2018 21:07:41 +0000 (22:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Jul 2018 09:12:32 +0000 (11:12 +0200)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/r8192U_dm.c
drivers/staging/rtl8192u/r8192U_dm.h

index 7dc912d..92ba1fd 100644 (file)
@@ -1614,97 +1614,6 @@ static void dm_bb_initialgain_backup(struct net_device *dev)
 
 #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()
  *
  * Overview:   Set DIG scheme init value.
index d7bd257..4716098 100644 (file)
@@ -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);