rtlwifi: rtl8192ce: Remove all instances of DBG_EMERG
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 15 Dec 2016 18:23:07 +0000 (12:23 -0600)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 30 Dec 2016 13:54:26 +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/rtl8192ce/hw.c
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/led.c
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.c
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/rf.c
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c

index b757a74339c13feaf19d63bf78c008f779f1d865..611987dfc20732e56517ec51106dfd8616407292 100644 (file)
@@ -140,8 +140,7 @@ void rtl92ce_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
        case HAL_DEF_WOWLAN:
                break;
        default:
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                        "switch case %#x not processed\n", variable);
+               pr_err("switch case %#x not processed\n", variable);
                break;
        }
 }
@@ -364,9 +363,8 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
                                        acm_ctrl &= (~AcmHw_VoqEn);
                                        break;
                                default:
-                                       RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                                                "switch case %#x not processed\n",
-                                                e_aci);
+                                       pr_err("switch case %#x not processed\n",
+                                              e_aci);
                                        break;
                                }
                        }
@@ -551,8 +549,7 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
                rtl92c_fill_h2c_cmd(hw, H2C_92C_KEEP_ALIVE_CTRL, 2, array);
                break; }
        default:
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                        "switch case %d not processed\n", variable);
+               pr_err("switch case %d not processed\n", variable);
                break;
        }
 }
@@ -573,9 +570,8 @@ static bool _rtl92ce_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;
                }
@@ -963,7 +959,7 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw)
        rtlpriv->intf_ops->disable_aspm(hw);
        rtstatus = _rtl92ce_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;
        }
@@ -1128,8 +1124,7 @@ static enum version_8192c _rtl92ce_read_chip_version(struct ieee80211_hw *hw)
                break;
        }
 
-       RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG,
-                "Chip Version ID: %s\n", versionid);
+       pr_info("Chip Version ID: %s\n", versionid);
 
        switch (version & 0x3) {
        case CHIP_88C:
@@ -1143,8 +1138,7 @@ static enum version_8192c _rtl92ce_read_chip_version(struct ieee80211_hw *hw)
                break;
        default:
                rtlphy->rf_type = RF_1T1R;
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                        "ERROR RF_Type is set!!\n");
+               pr_err("ERROR RF_Type is set!!\n");
                break;
        }
 
@@ -1193,8 +1187,7 @@ static int _rtl92ce_set_media_status(struct ieee80211_hw *hw,
                         "Set Network type to Mesh Point!\n");
                break;
        default:
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                        "Network type %d not supported!\n", type);
+               pr_err("Network type %d not supported!\n", type);
                return 1;
 
        }
@@ -1780,7 +1773,7 @@ void rtl92ce_read_eeprom_info(struct ieee80211_hw *hw)
                rtlefuse->autoload_failflag = false;
                _rtl92ce_read_adapter_info(hw);
        } else {
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Autoload ERR!!\n");
+               pr_err("Autoload ERR!!\n");
        }
        _rtl92ce_hal_customized_behavior(hw);
 }
@@ -2152,8 +2145,8 @@ void rtl92ce_set_key(struct ieee80211_hw *hw, u32 key_index,
                        enc_algo = CAM_AES;
                        break;
                default:
-                       RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                                "switch case %#x not processed\n", enc_algo);
+                       pr_err("switch case %#x not processed\n",
+                              enc_algo);
                        enc_algo = CAM_TKIP;
                        break;
                }
@@ -2171,9 +2164,7 @@ void rtl92ce_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 833193b751f73673cf3c0460a79a3427e3a6ee04..bdaa848995aec0bafc15434be2debcebbf3a986c 100644 (file)
@@ -57,8 +57,8 @@ void rtl92ce_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled)
                rtl_write_byte(rtlpriv, REG_LEDCFG2, (ledcfg & 0x0f) | BIT(5));
                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;
@@ -92,8 +92,7 @@ void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled)
                rtl_write_byte(rtlpriv, REG_LEDCFG2, (ledcfg | BIT(3)));
                break;
        default:
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                        "switch case %#x not processed\n", pled->ledpin);
+               pr_info("switch case %#x not processed\n", pled->ledpin);
                break;
        }
        pled->ledon = false;
index d1b6a8fe7b6a5c64094da84efafe5f85003d1f5f..7c6d7fc1ef9a7082df71cf12cb7a09c64c22818e 100644 (file)
@@ -297,10 +297,10 @@ bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
                break;
        case RF90_PATH_C:
        case RF90_PATH_D:
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                        "switch case %#x not processed\n", rfpath);
+               pr_info("Incorrect rfpath %#x\n", rfpath);
                break;
        default:
+               pr_info("switch case %#x not processed\n", rfpath);
                break;
        }
        return true;
@@ -340,8 +340,7 @@ void rtl92ce_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_info("unknown bandwidth: %#X\n", rtlphy->current_chan_bw);
                break;
        }
 
@@ -365,8 +364,8 @@ void rtl92ce_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;
        }
        rtl92ce_phy_rf6052_set_bandwidth(hw, rtlphy->current_chan_bw);
@@ -546,8 +545,8 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
                        break;
                }
        default:
-               RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
-                        "switch case %#x not processed\n", rfpwr_state);
+               pr_err("switch case %#x not processed\n",
+                      rfpwr_state);
                bresult = false;
                break;
        }
index 7cae6350437c72395a5a9bed876329a474a7bb55..e68ed7f37c79874d77819ece2387f449e6d8728a 100644 (file)
@@ -51,8 +51,7 @@ void rtl92ce_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 691ddef1ae28eab7d2a193fca3a72baa7871e480..9bd2bff6212a3c0750d32031893fad9c85782a88 100644 (file)
@@ -158,8 +158,7 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw)
        /* for firmware buf */
        rtlpriv->rtlhal.pfirmware = vzalloc(0x4000);
        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;
        }
 
@@ -173,8 +172,7 @@ int rtl92c_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;
        }
 
@@ -249,7 +247,7 @@ static struct rtl_mod_params rtl92ce_mod_params = {
        .inactiveps = true,
        .swctrl_lps = false,
        .fwctrl_lps = true,
-       .debug = DBG_EMERG,
+       .debug = 0,
 };
 
 static const struct rtl_hal_cfg rtl92ce_hal_cfg = {