staging:rtl8192u: Rename Register Constants - Style
authorJohn Whitmore <johnfwhitmore@gmail.com>
Fri, 3 Aug 2018 00:02:10 +0000 (01:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Aug 2018 14:21:07 +0000 (16:21 +0200)
The four register constants, 'Current_Tx_Rate_Reg',
'Initial_Tx_Rate_Reg', 'Tx_Retry_Count_Reg' and 'RegC38_TH' all cause
checkpatch issue with CamelCase naming. The three have been renamed to
'CURRENT_TX_RATE_REG', 'INITIAL_TX_RATE_REG', 'TX_RETRY_COUNT_REG' and
'REG_C38_TH' respectively.

These are coding style changes which should have 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 0e4f55c6493f931ad7c843099272faba90cf0978..5fb5f583f70384832161d937c1b32be98395290c 100644 (file)
@@ -2875,13 +2875,13 @@ void dm_check_fsync(struct net_device *dev)
 
                if (priv->framesyncMonitor) {
                        if (priv->ieee80211->state == IEEE80211_LINKED) {
-                               if (priv->undecorated_smoothed_pwdb <= RegC38_TH) {
+                               if (priv->undecorated_smoothed_pwdb <= REG_C38_TH) {
                                        if (reg_c38_State != RegC38_NonFsync_Other_AP) {
                                                write_nic_byte(dev, rOFDM0_RxDetector3, 0x90);
 
                                                reg_c38_State = RegC38_NonFsync_Other_AP;
                                        }
-                               } else if (priv->undecorated_smoothed_pwdb >= (RegC38_TH+5)) {
+                               } else if (priv->undecorated_smoothed_pwdb >= (REG_C38_TH + 5)) {
                                        if (reg_c38_State) {
                                                write_nic_byte(dev, rOFDM0_RxDetector3, priv->framesync);
                                                reg_c38_State = RegC38_Default;
@@ -3046,15 +3046,15 @@ static void dm_check_txrateandretrycount(struct net_device *dev)
        struct r8192_priv *priv = ieee80211_priv(dev);
        struct ieee80211_device *ieee = priv->ieee80211;
        /* for 11n tx rate */
-       /*priv->stats.CurrentShowTxate = read_nic_byte(dev, Current_Tx_Rate_Reg);*/
-       read_nic_byte(dev, Current_Tx_Rate_Reg, &ieee->softmac_stats.CurrentShowTxate);
+       /*priv->stats.CurrentShowTxate = read_nic_byte(dev, CURRENT_TX_RATE_REG);*/
+       read_nic_byte(dev, CURRENT_TX_RATE_REG, &ieee->softmac_stats.CurrentShowTxate);
        /*printk("=============>tx_rate_reg:%x\n", ieee->softmac_stats.CurrentShowTxate);*/
        /* for initial tx rate */
-       /*priv->stats.last_packet_rate = read_nic_byte(dev, Initial_Tx_Rate_Reg);*/
-       read_nic_byte(dev, Initial_Tx_Rate_Reg, &ieee->softmac_stats.last_packet_rate);
+       /*priv->stats.last_packet_rate = read_nic_byte(dev, INITIAL_TX_RATE_REG);*/
+       read_nic_byte(dev, INITIAL_TX_RATE_REG, &ieee->softmac_stats.last_packet_rate);
        /* for tx tx retry count */
-       /*priv->stats.txretrycount = read_nic_dword(dev, Tx_Retry_Count_Reg);*/
-       read_nic_dword(dev, Tx_Retry_Count_Reg, &ieee->softmac_stats.txretrycount);
+       /*priv->stats.txretrycount = read_nic_dword(dev, TX_RETRY_COUNT_REG);*/
+       read_nic_dword(dev, TX_RETRY_COUNT_REG, &ieee->softmac_stats.txretrycount);
 }
 
 static void dm_send_rssi_tofw(struct net_device *dev)
index 30241d91e44a4f6f012c82c9f4fe0cc0fcf17219..d93817f2a45b3b58dbe4325f3a631ee1b3915f81 100644 (file)
 #define                TX_POWER_ATHEROAP_THRESH_LOW            72
 
 /* defined by vivi, for showing on UI */
-#define                        Current_Tx_Rate_Reg         0x1b8
-#define                        Initial_Tx_Rate_Reg               0x1b9
-#define                        Tx_Retry_Count_Reg         0x1ac
-#define                RegC38_TH                                20
+#define                        CURRENT_TX_RATE_REG         0x1b8
+#define                        INITIAL_TX_RATE_REG               0x1b9
+#define                        TX_RETRY_COUNT_REG         0x1ac
+#define                REG_C38_TH                               20
 /*--------------------------Define Parameters-------------------------------*/