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: Joe Perches <joe@perches.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
4c48869f5d
commit
9d833ed752
@@ -2928,7 +2928,7 @@ static bool _rtl92d_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable,
|
||||
struct swchnlcmd *pcmd;
|
||||
|
||||
if (cmdtable == NULL) {
|
||||
RT_ASSERT(false, ("cmdtable cannot be NULL.\n"));
|
||||
RT_ASSERT(false, "cmdtable cannot be NULL\n");
|
||||
return false;
|
||||
}
|
||||
if (cmdtableidx >= cmdtablesz)
|
||||
@@ -3120,19 +3120,18 @@ u8 rtl92d_phy_sw_chnl(struct ieee80211_hw *hw)
|
||||
* 5G and 2.4G band. */
|
||||
if (channel <= 14)
|
||||
return 0;
|
||||
RT_ASSERT((channel > 14), ("5G but channel<=14"));
|
||||
RT_ASSERT((channel > 14), "5G but channel<=14\n");
|
||||
break;
|
||||
case BAND_ON_2_4G:
|
||||
/* Get first channel error when change between
|
||||
* 5G and 2.4G band. */
|
||||
if (channel > 14)
|
||||
return 0;
|
||||
RT_ASSERT((channel <= 14), ("2G but channel>14"));
|
||||
RT_ASSERT((channel <= 14), "2G but channel>14\n");
|
||||
break;
|
||||
default:
|
||||
RT_ASSERT(false,
|
||||
("Invalid WirelessMode(%#x)!!\n",
|
||||
rtlpriv->mac80211.mode));
|
||||
RT_ASSERT(false, "Invalid WirelessMode(%#x)!!\n",
|
||||
rtlpriv->mac80211.mode);
|
||||
break;
|
||||
}
|
||||
rtlphy->sw_chnl_inprogress = true;
|
||||
@@ -3563,7 +3562,7 @@ void rtl92d_phy_set_poweron(struct ieee80211_hw *hw)
|
||||
}
|
||||
}
|
||||
if (i == 200)
|
||||
RT_ASSERT(false, ("Another mac power off over time\n"));
|
||||
RT_ASSERT(false, "Another mac power off over time\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user