Commit 9d833ed7 authored by Joe Perches's avatar Joe Perches Committed by John W. Linville

rtlwifi: Convert RT_ASSERT macro to use ##__VA_ARGS__

Consolidate printks to avoid possible message interleaving
and reduce the object size.

Remove unnecessary RT_ASSERT parentheses.
Align arguments.
Coalesce formats.
Remove unnecessary __func__ use as the macro uses it.

$ size drivers/net/wireless/rtlwifi/built-in.o*
   text	   data	    bss	    dec	    hex	filename
 588901	  55333	 127216	 771450	  bc57a	drivers/net/wireless/rtlwifi/built-in.o.new
 590002	  55333	 127560	 772895	  bcb1f	drivers/net/wireless/rtlwifi/built-in.o.old
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4c48869f
...@@ -1026,8 +1026,8 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -1026,8 +1026,8 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
"set pairwise key\n"); "set pairwise key\n");
if (!sta) { if (!sta) {
RT_ASSERT(false, ("pairwise key withnot" RT_ASSERT(false,
"mac_addr\n")); "pairwise key without mac_addr\n");
err = -EOPNOTSUPP; err = -EOPNOTSUPP;
goto out_unlock; goto out_unlock;
......
...@@ -156,12 +156,11 @@ enum dbgp_flag_e { ...@@ -156,12 +156,11 @@ enum dbgp_flag_e {
DBGP_TYPE_MAX DBGP_TYPE_MAX
}; };
#define RT_ASSERT(_exp, fmt) \ #define RT_ASSERT(_exp, fmt, ...) \
do { \ do { \
if (!(_exp)) { \ if (!(_exp)) { \
printk(KERN_DEBUG "%s:%s(): ", \ printk(KERN_DEBUG KBUILD_MODNAME ":%s(): " fmt, \
KBUILD_MODNAME, __func__); \ __func__, ##__VA_ARGS__); \
printk fmt; \
} \ } \
} while (0) } while (0)
......
...@@ -1746,16 +1746,15 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, ...@@ -1746,16 +1746,15 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
err = pci_enable_device(pdev); err = pci_enable_device(pdev);
if (err) { if (err) {
RT_ASSERT(false, RT_ASSERT(false, "%s : Cannot enable new PCI device\n",
("%s : Cannot enable new PCI device\n", pci_name(pdev));
pci_name(pdev)));
return err; return err;
} }
if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) { if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
RT_ASSERT(false, ("Unable to obtain 32bit DMA " RT_ASSERT(false,
"for consistent allocations\n")); "Unable to obtain 32bit DMA for consistent allocations\n");
pci_disable_device(pdev); pci_disable_device(pdev);
return -ENOMEM; return -ENOMEM;
} }
...@@ -1767,7 +1766,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, ...@@ -1767,7 +1766,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
sizeof(struct rtl_priv), &rtl_ops); sizeof(struct rtl_priv), &rtl_ops);
if (!hw) { if (!hw) {
RT_ASSERT(false, RT_ASSERT(false,
("%s : ieee80211 alloc failed\n", pci_name(pdev))); "%s : ieee80211 alloc failed\n", pci_name(pdev));
err = -ENOMEM; err = -ENOMEM;
goto fail1; goto fail1;
} }
...@@ -1797,7 +1796,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, ...@@ -1797,7 +1796,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
/* MEM map */ /* MEM map */
err = pci_request_regions(pdev, KBUILD_MODNAME); err = pci_request_regions(pdev, KBUILD_MODNAME);
if (err) { if (err) {
RT_ASSERT(false, ("Can't obtain PCI resources\n")); RT_ASSERT(false, "Can't obtain PCI resources\n");
return err; return err;
} }
...@@ -1810,7 +1809,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, ...@@ -1810,7 +1809,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
(unsigned long)pci_iomap(pdev, (unsigned long)pci_iomap(pdev,
rtlpriv->cfg->bar_id, pmem_len); rtlpriv->cfg->bar_id, pmem_len);
if (rtlpriv->io.pci_mem_start == 0) { if (rtlpriv->io.pci_mem_start == 0) {
RT_ASSERT(false, ("Can't map PCI mem\n")); RT_ASSERT(false, "Can't map PCI mem\n");
goto fail2; goto fail2;
} }
......
...@@ -519,8 +519,8 @@ void rtl92c_fill_h2c_cmd(struct ieee80211_hw *hw, ...@@ -519,8 +519,8 @@ void rtl92c_fill_h2c_cmd(struct ieee80211_hw *hw,
u32 tmp_cmdbuf[2]; u32 tmp_cmdbuf[2];
if (rtlhal->fw_ready == false) { if (rtlhal->fw_ready == false) {
RT_ASSERT(false, ("return H2C cmd because of Fw " RT_ASSERT(false,
"download fail!!!\n")); "return H2C cmd because of Fw download fail!!!\n");
return; return;
} }
...@@ -544,7 +544,7 @@ void rtl92c_firmware_selfreset(struct ieee80211_hw *hw) ...@@ -544,7 +544,7 @@ void rtl92c_firmware_selfreset(struct ieee80211_hw *hw)
while (u1b_tmp & BIT(2)) { while (u1b_tmp & BIT(2)) {
delay--; delay--;
if (delay == 0) { if (delay == 0) {
RT_ASSERT(false, ("8051 reset fail.\n")); RT_ASSERT(false, "8051 reset fail\n");
break; break;
} }
udelay(50); udelay(50);
......
...@@ -85,7 +85,7 @@ EXPORT_SYMBOL(rtl92c_phy_set_bb_reg); ...@@ -85,7 +85,7 @@ EXPORT_SYMBOL(rtl92c_phy_set_bb_reg);
u32 _rtl92c_phy_fw_rf_serial_read(struct ieee80211_hw *hw, u32 _rtl92c_phy_fw_rf_serial_read(struct ieee80211_hw *hw,
enum radio_path rfpath, u32 offset) enum radio_path rfpath, u32 offset)
{ {
RT_ASSERT(false, ("deprecated!\n")); RT_ASSERT(false, "deprecated!\n");
return 0; return 0;
} }
...@@ -95,7 +95,7 @@ void _rtl92c_phy_fw_rf_serial_write(struct ieee80211_hw *hw, ...@@ -95,7 +95,7 @@ void _rtl92c_phy_fw_rf_serial_write(struct ieee80211_hw *hw,
enum radio_path rfpath, u32 offset, enum radio_path rfpath, u32 offset,
u32 data) u32 data)
{ {
RT_ASSERT(false, ("deprecated!\n")); RT_ASSERT(false, "deprecated!\n");
} }
EXPORT_SYMBOL(_rtl92c_phy_fw_rf_serial_write); EXPORT_SYMBOL(_rtl92c_phy_fw_rf_serial_write);
...@@ -776,7 +776,7 @@ u8 rtl92c_phy_sw_chnl(struct ieee80211_hw *hw) ...@@ -776,7 +776,7 @@ u8 rtl92c_phy_sw_chnl(struct ieee80211_hw *hw)
if (rtlphy->set_bwmode_inprogress) if (rtlphy->set_bwmode_inprogress)
return 0; return 0;
RT_ASSERT((rtlphy->current_channel <= 14), RT_ASSERT((rtlphy->current_channel <= 14),
("WIRELESS_MODE_G but channel>14")); "WIRELESS_MODE_G but channel>14\n");
rtlphy->sw_chnl_inprogress = true; rtlphy->sw_chnl_inprogress = true;
rtlphy->sw_chnl_stage = 0; rtlphy->sw_chnl_stage = 0;
rtlphy->sw_chnl_step = 0; rtlphy->sw_chnl_step = 0;
...@@ -802,7 +802,7 @@ static bool _rtl92c_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable, ...@@ -802,7 +802,7 @@ static bool _rtl92c_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable,
struct swchnlcmd *pcmd; struct swchnlcmd *pcmd;
if (cmdtable == NULL) { if (cmdtable == NULL) {
RT_ASSERT(false, ("cmdtable cannot be NULL.\n")); RT_ASSERT(false, "cmdtable cannot be NULL\n");
return false; return false;
} }
...@@ -848,7 +848,7 @@ bool _rtl92c_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw, ...@@ -848,7 +848,7 @@ bool _rtl92c_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw,
rfdependcmdcnt = 0; rfdependcmdcnt = 0;
RT_ASSERT((channel >= 1 && channel <= 14), RT_ASSERT((channel >= 1 && channel <= 14),
("illegal channel for Zebra: %d\n", channel)); "invalid channel for Zebra: %d\n", channel);
_rtl92c_phy_set_sw_chnl_cmdarray(rfdependcmd, rfdependcmdcnt++, _rtl92c_phy_set_sw_chnl_cmdarray(rfdependcmd, rfdependcmdcnt++,
MAX_RFDEPENDCMD_CNT, CMDID_RF_WRITEREG, MAX_RFDEPENDCMD_CNT, CMDID_RF_WRITEREG,
......
...@@ -1166,7 +1166,7 @@ void rtl92ce_set_qos(struct ieee80211_hw *hw, int aci) ...@@ -1166,7 +1166,7 @@ void rtl92ce_set_qos(struct ieee80211_hw *hw, int aci)
rtl_write_dword(rtlpriv, REG_EDCA_VO_PARAM, 0x2f3222); rtl_write_dword(rtlpriv, REG_EDCA_VO_PARAM, 0x2f3222);
break; break;
default: default:
RT_ASSERT(false, ("invalid aci: %d !\n", aci)); RT_ASSERT(false, "invalid aci: %d !\n", aci);
break; break;
} }
} }
......
...@@ -404,7 +404,7 @@ static int __init rtl92ce_module_init(void) ...@@ -404,7 +404,7 @@ static int __init rtl92ce_module_init(void)
ret = pci_register_driver(&rtl92ce_driver); ret = pci_register_driver(&rtl92ce_driver);
if (ret) if (ret)
RT_ASSERT(false, (": No device found\n")); RT_ASSERT(false, "No device found\n");
return ret; return ret;
} }
......
...@@ -836,8 +836,8 @@ void rtl92ce_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) ...@@ -836,8 +836,8 @@ void rtl92ce_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val)
SET_TX_DESC_NEXT_DESC_ADDRESS(pdesc, *(u32 *) val); SET_TX_DESC_NEXT_DESC_ADDRESS(pdesc, *(u32 *) val);
break; break;
default: default:
RT_ASSERT(false, ("ERR txdesc :%d" RT_ASSERT(false, "ERR txdesc :%d not process\n",
" not process\n", desc_name)); desc_name);
break; break;
} }
} else { } else {
...@@ -856,8 +856,8 @@ void rtl92ce_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) ...@@ -856,8 +856,8 @@ void rtl92ce_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val)
SET_RX_DESC_EOR(pdesc, 1); SET_RX_DESC_EOR(pdesc, 1);
break; break;
default: default:
RT_ASSERT(false, ("ERR rxdesc :%d " RT_ASSERT(false, "ERR rxdesc :%d not process\n",
"not process\n", desc_name)); desc_name);
break; break;
} }
} }
...@@ -876,8 +876,8 @@ u32 rtl92ce_get_desc(u8 *p_desc, bool istx, u8 desc_name) ...@@ -876,8 +876,8 @@ u32 rtl92ce_get_desc(u8 *p_desc, bool istx, u8 desc_name)
ret = GET_TX_DESC_TX_BUFFER_ADDRESS(p_desc); ret = GET_TX_DESC_TX_BUFFER_ADDRESS(p_desc);
break; break;
default: default:
RT_ASSERT(false, ("ERR txdesc :%d " RT_ASSERT(false, "ERR txdesc :%d not process\n",
"not process\n", desc_name)); desc_name);
break; break;
} }
} else { } else {
...@@ -890,8 +890,8 @@ u32 rtl92ce_get_desc(u8 *p_desc, bool istx, u8 desc_name) ...@@ -890,8 +890,8 @@ u32 rtl92ce_get_desc(u8 *p_desc, bool istx, u8 desc_name)
ret = GET_RX_DESC_PKT_LEN(pdesc); ret = GET_RX_DESC_PKT_LEN(pdesc);
break; break;
default: default:
RT_ASSERT(false, ("ERR rxdesc :%d " RT_ASSERT(false, "ERR rxdesc :%d not process\n",
"not process\n", desc_name)); desc_name);
break; break;
} }
} }
......
...@@ -1984,8 +1984,9 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) ...@@ -1984,8 +1984,9 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
u4b_ac_param); u4b_ac_param);
break; break;
default: default:
RT_ASSERT(false, ("SetHwReg8185(): invalid" RT_ASSERT(false,
" aci: %d !\n", e_aci)); "SetHwReg8185(): invalid aci: %d !\n",
e_aci);
break; break;
} }
if (rtlusb->acm_method != eAcmWay2_SW) if (rtlusb->acm_method != eAcmWay2_SW)
......
...@@ -428,7 +428,7 @@ void rtl92c_set_qos(struct ieee80211_hw *hw, int aci) ...@@ -428,7 +428,7 @@ void rtl92c_set_qos(struct ieee80211_hw *hw, int aci)
rtl_write_dword(rtlpriv, REG_EDCA_VO_PARAM, u4b_ac_param); rtl_write_dword(rtlpriv, REG_EDCA_VO_PARAM, u4b_ac_param);
break; break;
default: default:
RT_ASSERT(false, ("invalid aci: %d !\n", aci)); RT_ASSERT(false, "invalid aci: %d !\n", aci);
break; break;
} }
} }
......
...@@ -244,8 +244,8 @@ u16 rtl8192cu_mq_to_hwq(__le16 fc, u16 mac80211_queue_index) ...@@ -244,8 +244,8 @@ u16 rtl8192cu_mq_to_hwq(__le16 fc, u16 mac80211_queue_index)
break; break;
default: default:
hw_queue_index = RTL_TXQ_BE; hw_queue_index = RTL_TXQ_BE;
RT_ASSERT(false, ("QSLT_BE queue, skb_queue:%d\n", RT_ASSERT(false, "QSLT_BE queue, skb_queue:%d\n",
mac80211_queue_index)); mac80211_queue_index);
break; break;
} }
out: out:
......
...@@ -186,7 +186,7 @@ void rtl92d_firmware_selfreset(struct ieee80211_hw *hw) ...@@ -186,7 +186,7 @@ void rtl92d_firmware_selfreset(struct ieee80211_hw *hw)
udelay(50); udelay(50);
u1b_tmp = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1); u1b_tmp = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1);
} }
RT_ASSERT((delay > 0), ("8051 reset failed!\n")); RT_ASSERT((delay > 0), "8051 reset failed!\n");
RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG, RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG,
"=====> 8051 reset success (%d)\n", delay); "=====> 8051 reset success (%d)\n", delay);
} }
...@@ -536,8 +536,8 @@ void rtl92d_fill_h2c_cmd(struct ieee80211_hw *hw, ...@@ -536,8 +536,8 @@ void rtl92d_fill_h2c_cmd(struct ieee80211_hw *hw,
u32 tmp_cmdbuf[2]; u32 tmp_cmdbuf[2];
if (rtlhal->fw_ready == false) { if (rtlhal->fw_ready == false) {
RT_ASSERT(false, ("return H2C cmd because of Fw " RT_ASSERT(false,
"download fail!!!\n")); "return H2C cmd because of Fw download fail!!!\n");
return; return;
} }
memset(tmp_cmdbuf, 0, 8); memset(tmp_cmdbuf, 0, 8);
......
...@@ -1213,7 +1213,7 @@ void rtl92de_set_qos(struct ieee80211_hw *hw, int aci) ...@@ -1213,7 +1213,7 @@ void rtl92de_set_qos(struct ieee80211_hw *hw, int aci)
rtl_write_dword(rtlpriv, REG_EDCA_VO_PARAM, 0x2f3222); rtl_write_dword(rtlpriv, REG_EDCA_VO_PARAM, 0x2f3222);
break; break;
default: default:
RT_ASSERT(false, ("invalid aci: %d !\n", aci)); RT_ASSERT(false, "invalid aci: %d !\n", aci);
break; break;
} }
} }
......
...@@ -2928,7 +2928,7 @@ static bool _rtl92d_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable, ...@@ -2928,7 +2928,7 @@ static bool _rtl92d_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable,
struct swchnlcmd *pcmd; struct swchnlcmd *pcmd;
if (cmdtable == NULL) { if (cmdtable == NULL) {
RT_ASSERT(false, ("cmdtable cannot be NULL.\n")); RT_ASSERT(false, "cmdtable cannot be NULL\n");
return false; return false;
} }
if (cmdtableidx >= cmdtablesz) if (cmdtableidx >= cmdtablesz)
...@@ -3120,19 +3120,18 @@ u8 rtl92d_phy_sw_chnl(struct ieee80211_hw *hw) ...@@ -3120,19 +3120,18 @@ u8 rtl92d_phy_sw_chnl(struct ieee80211_hw *hw)
* 5G and 2.4G band. */ * 5G and 2.4G band. */
if (channel <= 14) if (channel <= 14)
return 0; return 0;
RT_ASSERT((channel > 14), ("5G but channel<=14")); RT_ASSERT((channel > 14), "5G but channel<=14\n");
break; break;
case BAND_ON_2_4G: case BAND_ON_2_4G:
/* Get first channel error when change between /* Get first channel error when change between
* 5G and 2.4G band. */ * 5G and 2.4G band. */
if (channel > 14) if (channel > 14)
return 0; return 0;
RT_ASSERT((channel <= 14), ("2G but channel>14")); RT_ASSERT((channel <= 14), "2G but channel>14\n");
break; break;
default: default:
RT_ASSERT(false, RT_ASSERT(false, "Invalid WirelessMode(%#x)!!\n",
("Invalid WirelessMode(%#x)!!\n", rtlpriv->mac80211.mode);
rtlpriv->mac80211.mode));
break; break;
} }
rtlphy->sw_chnl_inprogress = true; rtlphy->sw_chnl_inprogress = true;
...@@ -3563,7 +3562,7 @@ void rtl92d_phy_set_poweron(struct ieee80211_hw *hw) ...@@ -3563,7 +3562,7 @@ void rtl92d_phy_set_poweron(struct ieee80211_hw *hw)
} }
} }
if (i == 200) if (i == 200)
RT_ASSERT(false, ("Another mac power off over time\n")); RT_ASSERT(false, "Another mac power off over time\n");
} }
} }
......
...@@ -424,7 +424,7 @@ static int __init rtl92de_module_init(void) ...@@ -424,7 +424,7 @@ static int __init rtl92de_module_init(void)
ret = pci_register_driver(&rtl92de_driver); ret = pci_register_driver(&rtl92de_driver);
if (ret) if (ret)
RT_ASSERT(false, (": No device found\n")); RT_ASSERT(false, "No device found\n");
return ret; return ret;
} }
......
...@@ -793,8 +793,8 @@ void rtl92de_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) ...@@ -793,8 +793,8 @@ void rtl92de_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val)
SET_TX_DESC_NEXT_DESC_ADDRESS(pdesc, *(u32 *) val); SET_TX_DESC_NEXT_DESC_ADDRESS(pdesc, *(u32 *) val);
break; break;
default: default:
RT_ASSERT(false, ("ERR txdesc :%d" RT_ASSERT(false, "ERR txdesc :%d not process\n",
" not process\n", desc_name)); desc_name);
break; break;
} }
} else { } else {
...@@ -813,8 +813,8 @@ void rtl92de_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) ...@@ -813,8 +813,8 @@ void rtl92de_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val)
SET_RX_DESC_EOR(pdesc, 1); SET_RX_DESC_EOR(pdesc, 1);
break; break;
default: default:
RT_ASSERT(false, ("ERR rxdesc :%d " RT_ASSERT(false, "ERR rxdesc :%d not process\n",
"not process\n", desc_name)); desc_name);
break; break;
} }
} }
...@@ -833,8 +833,8 @@ u32 rtl92de_get_desc(u8 *p_desc, bool istx, u8 desc_name) ...@@ -833,8 +833,8 @@ u32 rtl92de_get_desc(u8 *p_desc, bool istx, u8 desc_name)
ret = GET_TX_DESC_TX_BUFFER_ADDRESS(p_desc); ret = GET_TX_DESC_TX_BUFFER_ADDRESS(p_desc);
break; break;
default: default:
RT_ASSERT(false, ("ERR txdesc :%d " RT_ASSERT(false, "ERR txdesc :%d not process\n",
"not process\n", desc_name)); desc_name);
break; break;
} }
} else { } else {
...@@ -847,8 +847,8 @@ u32 rtl92de_get_desc(u8 *p_desc, bool istx, u8 desc_name) ...@@ -847,8 +847,8 @@ u32 rtl92de_get_desc(u8 *p_desc, bool istx, u8 desc_name)
ret = GET_RX_DESC_PKT_LEN(pdesc); ret = GET_RX_DESC_PKT_LEN(pdesc);
break; break;
default: default:
RT_ASSERT(false, ("ERR rxdesc :%d " RT_ASSERT(false, "ERR rxdesc :%d not process\n",
"not process\n", desc_name)); desc_name);
break; break;
} }
} }
......
...@@ -1200,7 +1200,7 @@ void rtl92se_set_qos(struct ieee80211_hw *hw, int aci) ...@@ -1200,7 +1200,7 @@ void rtl92se_set_qos(struct ieee80211_hw *hw, int aci)
rtl_write_dword(rtlpriv, EDCAPARA_VO, 0x2f3222); rtl_write_dword(rtlpriv, EDCAPARA_VO, 0x2f3222);
break; break;
default: default:
RT_ASSERT(false, ("invalid aci: %d !\n", aci)); RT_ASSERT(false, "invalid aci: %d !\n", aci);
break; break;
} }
} }
......
...@@ -335,7 +335,7 @@ static bool _rtl92s_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable, ...@@ -335,7 +335,7 @@ static bool _rtl92s_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable,
struct swchnlcmd *pcmd; struct swchnlcmd *pcmd;
if (cmdtable == NULL) { if (cmdtable == NULL) {
RT_ASSERT(false, ("cmdtable cannot be NULL.\n")); RT_ASSERT(false, "cmdtable cannot be NULL\n");
return false; return false;
} }
...@@ -380,7 +380,7 @@ static bool _rtl92s_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw, ...@@ -380,7 +380,7 @@ static bool _rtl92s_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw,
rfdependcmdcnt = 0; rfdependcmdcnt = 0;
RT_ASSERT((channel >= 1 && channel <= 14), RT_ASSERT((channel >= 1 && channel <= 14),
("illegal channel for Zebra: %d\n", channel)); "invalid channel for Zebra: %d\n", channel);
_rtl92s_phy_set_sw_chnl_cmdarray(rfdependcmd, rfdependcmdcnt++, _rtl92s_phy_set_sw_chnl_cmdarray(rfdependcmd, rfdependcmdcnt++,
MAX_RFDEPENDCMD_CNT, CMDID_RF_WRITEREG, MAX_RFDEPENDCMD_CNT, CMDID_RF_WRITEREG,
......
...@@ -426,7 +426,7 @@ static int __init rtl92se_module_init(void) ...@@ -426,7 +426,7 @@ static int __init rtl92se_module_init(void)
ret = pci_register_driver(&rtl92se_driver); ret = pci_register_driver(&rtl92se_driver);
if (ret) if (ret)
RT_ASSERT(false, (": No device found\n")); RT_ASSERT(false, "No device found\n");
return ret; return ret;
} }
......
...@@ -823,8 +823,8 @@ void rtl92se_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) ...@@ -823,8 +823,8 @@ void rtl92se_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val)
SET_TX_DESC_NEXT_DESC_ADDRESS(pdesc, *(u32 *) val); SET_TX_DESC_NEXT_DESC_ADDRESS(pdesc, *(u32 *) val);
break; break;
default: default:
RT_ASSERT(false, ("ERR txdesc :%d not process\n", RT_ASSERT(false, "ERR txdesc :%d not process\n",
desc_name)); desc_name);
break; break;
} }
} else { } else {
...@@ -843,8 +843,8 @@ void rtl92se_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) ...@@ -843,8 +843,8 @@ void rtl92se_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val)
SET_RX_STATUS_DESC_EOR(pdesc, 1); SET_RX_STATUS_DESC_EOR(pdesc, 1);
break; break;
default: default:
RT_ASSERT(false, ("ERR rxdesc :%d not process\n", RT_ASSERT(false, "ERR rxdesc :%d not process\n",
desc_name)); desc_name);
break; break;
} }
} }
...@@ -863,8 +863,8 @@ u32 rtl92se_get_desc(u8 *desc, bool istx, u8 desc_name) ...@@ -863,8 +863,8 @@ u32 rtl92se_get_desc(u8 *desc, bool istx, u8 desc_name)
ret = GET_TX_DESC_TX_BUFFER_ADDRESS(desc); ret = GET_TX_DESC_TX_BUFFER_ADDRESS(desc);
break; break;
default: default:
RT_ASSERT(false, ("ERR txdesc :%d not process\n", RT_ASSERT(false, "ERR txdesc :%d not process\n",
desc_name)); desc_name);
break; break;
} }
} else { } else {
...@@ -876,8 +876,8 @@ u32 rtl92se_get_desc(u8 *desc, bool istx, u8 desc_name) ...@@ -876,8 +876,8 @@ u32 rtl92se_get_desc(u8 *desc, bool istx, u8 desc_name)
ret = GET_RX_STATUS_DESC_PKT_LEN(desc); ret = GET_RX_STATUS_DESC_PKT_LEN(desc);
break; break;
default: default:
RT_ASSERT(false, ("ERR rxdesc :%d not process\n", RT_ASSERT(false, "ERR rxdesc :%d not process\n",
desc_name)); desc_name);
break; break;
} }
} }
......
...@@ -946,7 +946,7 @@ int __devinit rtl_usb_probe(struct usb_interface *intf, ...@@ -946,7 +946,7 @@ int __devinit rtl_usb_probe(struct usb_interface *intf,
hw = ieee80211_alloc_hw(sizeof(struct rtl_priv) + hw = ieee80211_alloc_hw(sizeof(struct rtl_priv) +
sizeof(struct rtl_usb_priv), &rtl_ops); sizeof(struct rtl_usb_priv), &rtl_ops);
if (!hw) { if (!hw) {
RT_ASSERT(false, ("%s : ieee80211 alloc failed\n", __func__)); RT_ASSERT(false, "ieee80211 alloc failed\n");
return -ENOMEM; return -ENOMEM;
} }
rtlpriv = hw->priv; rtlpriv = hw->priv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment