rtlwifi: rtl8723be: Remove all instances of DBG_EMERG
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 15 Dec 2016 18:23:00 +0000 (12:23 -0600)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 30 Dec 2016 13:54:21 +0000 (15:54 +0200)
This is a step toward eliminating the RT_TRACE macros. Those calls that
have DBG_EMERG as the level are always logged, and they represent error
conditions, thus they are replaced with pr_err().

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/rtl8723be/fw.c
drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
drivers/net/wireless/realtek/rtlwifi/rtl8723be/led.c
drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c
drivers/net/wireless/realtek/rtlwifi/rtl8723be/rf.c
drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c

index 6b03c7f..fbf3961 100644 (file)
@@ -97,8 +97,7 @@ static void _rtl8723be_fill_h2c_command(struct ieee80211_hw *hw, u8 element_id,
        while (!bwrite_sucess) {
                wait_writeh2c_limmit--;
                if (wait_writeh2c_limmit == 0) {
-                       RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                                "Write H2C fail because no trigger for FW INT!\n");
+                       pr_err("Write H2C fail because no trigger for FW INT!\n");
                        break;
                }
 
@@ -121,8 +120,8 @@ static void _rtl8723be_fill_h2c_command(struct ieee80211_hw *hw, u8 element_id,
                        box_extreg = REG_HMEBOX_EXT_3;
                        break;
                default:
-                       RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                                "switch case %#x not processed\n", boxnum);
+                       pr_err("switch case %#x not processed\n",
+                              boxnum);
                        break;
                }
 
@@ -194,8 +193,8 @@ static void _rtl8723be_fill_h2c_command(struct ieee80211_hw *hw, u8 element_id,
                        }
                        break;
                default:
-                       RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                                "switch case %#x not processed\n", cmd_len);
+                       pr_err("switch case %#x not processed\n",
+                              cmd_len);
                        break;
                }
 
index 56a1ae4..ae2a38e 100644 (file)
@@ -747,9 +747,8 @@ static bool _rtl8723be_llt_write(struct ieee80211_hw *hw, u32 address, u32 data)
                        break;
 
                if (count > POLLING_LLT_THRESHOLD) {
-                       RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                                "Failed to polling write LLT done at address %d!\n",
-                                address);
+                       pr_err("Failed to polling write LLT done at address %d!\n",
+                              address);
                        status = false;
                        break;
                }
@@ -1383,7 +1382,7 @@ int rtl8723be_hw_init(struct ieee80211_hw *hw)
        }
        rtstatus = _rtl8723be_init_mac(hw);
        if (!rtstatus) {
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Init MAC failed\n");
+               pr_err("Init MAC failed\n");
                err = 1;
                goto exit;
        }
@@ -1532,8 +1531,7 @@ static int _rtl8723be_set_media_status(struct ieee80211_hw *hw,
                         "Set Network type to AP!\n");
                break;
        default:
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                        "Network type %d not support!\n", type);
+               pr_err("Network type %d not support!\n", type);
                return 1;
        }
 
@@ -2247,7 +2245,7 @@ void rtl8723be_read_eeprom_info(struct ieee80211_hw *hw)
                rtlefuse->autoload_failflag = false;
                _rtl8723be_read_adapter_info(hw, false);
        } else {
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Autoload ERR!!\n");
+               pr_err("Autoload ERR!!\n");
        }
        _rtl8723be_hal_customized_behavior(hw);
 }
@@ -2584,9 +2582,7 @@ void rtl8723be_set_key(struct ieee80211_hw *hw, u32 key_index,
                                        entry_id = rtl_cam_get_free_entry(hw,
                                                                p_macaddr);
                                        if (entry_id >=  TOTAL_CAM_ENTRY) {
-                                               RT_TRACE(rtlpriv, COMP_SEC,
-                                                        DBG_EMERG,
-                                                        "Can not find free hw security cam entry\n");
+                                               pr_err("Can not find free hw security cam entry\n");
                                                return;
                                        }
                                } else {
index 497913e..8232e01 100644 (file)
@@ -57,8 +57,8 @@ void rtl8723be_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled)
                rtl_write_byte(rtlpriv, REG_LEDCFG1, ledcfg & 0x10);
                break;
        default:
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                        "switch case %#x not processed\n", pled->ledpin);
+               pr_err("switch case %#x not processed\n",
+                      pled->ledpin);
                break;
        }
        pled->ledon = true;
@@ -99,8 +99,8 @@ void rtl8723be_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
 
                break;
        default:
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                        "switch case %#x not processed\n", pled->ledpin);
+               pr_err("switch case %#x not processed\n",
+                      pled->ledpin);
                break;
        }
        pled->ledon = false;
index b4e0a58..ab0f39e 100644 (file)
@@ -467,7 +467,7 @@ static bool _rtl8723be_phy_bb8723b_config_parafile(struct ieee80211_hw *hw)
        rtstatus = _rtl8723be_phy_config_bb_with_headerfile(hw,
                                                BASEBAND_CONFIG_PHY_REG);
        if (!rtstatus) {
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Write BB Reg Fail!!\n");
+               pr_err("Write BB Reg Fail!!\n");
                return false;
        }
        _rtl8723be_phy_init_tx_power_by_rate(hw);
@@ -478,13 +478,13 @@ static bool _rtl8723be_phy_bb8723b_config_parafile(struct ieee80211_hw *hw)
        }
        phy_txpower_by_rate_config(hw);
        if (!rtstatus) {
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "BB_PG Reg Fail!!\n");
+               pr_err("BB_PG Reg Fail!!\n");
                return false;
        }
        rtstatus = _rtl8723be_phy_config_bb_with_headerfile(hw,
                                                BASEBAND_CONFIG_AGC_TAB);
        if (!rtstatus) {
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "AGC Table Fail\n");
+               pr_err("AGC Table Fail\n");
                return false;
        }
        rtlphy->cck_high_power = (bool)(rtl_get_bbreg(hw,
@@ -1249,8 +1249,7 @@ void rtl8723be_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation)
                                                      (u8 *)&iotype);
                        break;
                default:
-                       RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                                "Unknown Scan Backup operation.\n");
+                       pr_err("Unknown Scan Backup operation.\n");
                        break;
                }
        }
@@ -1291,8 +1290,8 @@ void rtl8723be_phy_set_bw_mode_callback(struct ieee80211_hw *hw)
                rtl_write_byte(rtlpriv, REG_RRSR + 2, reg_prsr_rsc);
                break;
        default:
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                        "unknown bandwidth: %#X\n", rtlphy->current_chan_bw);
+               pr_err("unknown bandwidth: %#X\n",
+                      rtlphy->current_chan_bw);
                break;
        }
 
@@ -1316,8 +1315,8 @@ void rtl8723be_phy_set_bw_mode_callback(struct ieee80211_hw *hw)
                               HAL_PRIME_CHNL_OFFSET_LOWER) ? 2 : 1);
                break;
        default:
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                        "unknown bandwidth: %#X\n", rtlphy->current_chan_bw);
+               pr_err("unknown bandwidth: %#X\n",
+                      rtlphy->current_chan_bw);
                break;
        }
        rtl8723be_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw);
@@ -1462,8 +1461,8 @@ static bool _rtl8723be_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw,
                        currentcmd = &postcommoncmd[*step];
                        break;
                default:
-                       RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                                "Invalid 'stage' = %d, Check it!\n", *stage);
+                       pr_err("Invalid 'stage' = %d, Check it!\n",
+                              *stage);
                        return true;
                }
 
index 78f4f18..4849145 100644 (file)
@@ -51,8 +51,7 @@ void rtl8723be_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth)
                              rtlphy->rfreg_chnlval[0]);
                break;
        default:
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                        "unknown bandwidth: %#X\n", bandwidth);
+               pr_err("unknown bandwidth: %#X\n", bandwidth);
                break;
        }
 }
index 847644d..dd42c1a 100644 (file)
@@ -179,8 +179,7 @@ int rtl8723be_init_sw_vars(struct ieee80211_hw *hw)
        /* for firmware buf */
        rtlpriv->rtlhal.pfirmware = vzalloc(0x8000);
        if (!rtlpriv->rtlhal.pfirmware) {
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                        "Can't alloc buffer for fw.\n");
+               pr_err("Can't alloc buffer for fw.\n");
                return 1;
        }
 
@@ -190,8 +189,7 @@ int rtl8723be_init_sw_vars(struct ieee80211_hw *hw)
                                      rtlpriv->io.dev, GFP_KERNEL, hw,
                                      rtl_fw_cb);
        if (err) {
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                        "Failed to request firmware!\n");
+               pr_err("Failed to request firmware!\n");
                return 1;
        }
        return 0;
@@ -273,7 +271,7 @@ static struct rtl_mod_params rtl8723be_mod_params = {
        .fwctrl_lps = true,
        .msi_support = false,
        .disable_watchdog = false,
-       .debug = DBG_EMERG,
+       .debug = 0,
        .ant_sel = 0,
 };