diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2016-12-15 21:23:10 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-12-30 16:54:28 +0300 |
commit | c93ac39da006457fc5b9b74f1505624dd509bf68 (patch) | |
tree | 97e03e22e16def4850da2035fa0317b59244e6c1 /drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c | |
parent | 02527a73beb344f8f7fff39c04e29a94127b8ee8 (diff) | |
download | linux-c93ac39da006457fc5b9b74f1505624dd509bf68.tar.xz |
rtlwifi: Remove some redundant code
The symbol DBG_EMERG is no longer used and is removed.
In a number of places, the code has redundant messages. For example, if
the failure for the firmware to run is logged, it is not necessary to
log that the firmware has been started. In addition, extraneous braces are
removed.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c index 87e90a3c8911..aa1e51c871df 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c @@ -125,9 +125,8 @@ static void _rtl92d_write_fw(struct ieee80211_hw *hw, _rtl92d_fill_dummy(bufferPtr, &size); pagenums = size / FW_8192D_PAGE_SIZE; remainSize = size % FW_8192D_PAGE_SIZE; - if (pagenums > 8) { + if (pagenums > 8) pr_err("Page numbers should not greater then 8\n"); - } for (page = 0; page < pagenums; page++) { offset = page * FW_8192D_PAGE_SIZE; _rtl92d_fw_page_write(hw, page, (bufferPtr + offset), @@ -156,8 +155,6 @@ static int _rtl92d_fw_free_to_go(struct ieee80211_hw *hw) value32); return -EIO; } - RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE, - "Checksum report OK ! REG_MCUFWDL:0x%08x\n", value32); value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL); value32 |= MCUFWDL_RDY; rtl_write_dword(rtlpriv, REG_MCUFWDL, value32); @@ -324,12 +321,9 @@ int rtl92d_download_fw(struct ieee80211_hw *hw) value &= (~BIT(5)); rtl_write_byte(rtlpriv, 0x1f, value); spin_unlock_irqrestore(&globalmutex_for_fwdownload, flags); - if (err) { + if (err) pr_err("fw is not ready to run!\n"); goto exit; - } else { - RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE, "fw is ready to run!\n"); - } exit: err = _rtl92d_fw_init(hw); return err; |