aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-01-04 22:40:43 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-24 14:07:40 -0500
commit9d833ed752e91c71792dd8ebfd0f865e6a568a37 (patch)
treea0b03e38ee9a2186523df595c18e3839ab603c1f /drivers/net/wireless/rtlwifi/rtl8192de/phy.c
parent4c48869f5d6e4ee4a773fd67a01e1b934faa57f8 (diff)
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>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192de/phy.c')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192de/phy.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
index c736b933488..f27acc75494 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
@@ -2928,7 +2928,7 @@ static bool _rtl92d_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable,
2928 struct swchnlcmd *pcmd; 2928 struct swchnlcmd *pcmd;
2929 2929
2930 if (cmdtable == NULL) { 2930 if (cmdtable == NULL) {
2931 RT_ASSERT(false, ("cmdtable cannot be NULL.\n")); 2931 RT_ASSERT(false, "cmdtable cannot be NULL\n");
2932 return false; 2932 return false;
2933 } 2933 }
2934 if (cmdtableidx >= cmdtablesz) 2934 if (cmdtableidx >= cmdtablesz)
@@ -3120,19 +3120,18 @@ u8 rtl92d_phy_sw_chnl(struct ieee80211_hw *hw)
3120 * 5G and 2.4G band. */ 3120 * 5G and 2.4G band. */
3121 if (channel <= 14) 3121 if (channel <= 14)
3122 return 0; 3122 return 0;
3123 RT_ASSERT((channel > 14), ("5G but channel<=14")); 3123 RT_ASSERT((channel > 14), "5G but channel<=14\n");
3124 break; 3124 break;
3125 case BAND_ON_2_4G: 3125 case BAND_ON_2_4G:
3126 /* Get first channel error when change between 3126 /* Get first channel error when change between
3127 * 5G and 2.4G band. */ 3127 * 5G and 2.4G band. */
3128 if (channel > 14) 3128 if (channel > 14)
3129 return 0; 3129 return 0;
3130 RT_ASSERT((channel <= 14), ("2G but channel>14")); 3130 RT_ASSERT((channel <= 14), "2G but channel>14\n");
3131 break; 3131 break;
3132 default: 3132 default:
3133 RT_ASSERT(false, 3133 RT_ASSERT(false, "Invalid WirelessMode(%#x)!!\n",
3134 ("Invalid WirelessMode(%#x)!!\n", 3134 rtlpriv->mac80211.mode);
3135 rtlpriv->mac80211.mode));
3136 break; 3135 break;
3137 } 3136 }
3138 rtlphy->sw_chnl_inprogress = true; 3137 rtlphy->sw_chnl_inprogress = true;
@@ -3563,7 +3562,7 @@ void rtl92d_phy_set_poweron(struct ieee80211_hw *hw)
3563 } 3562 }
3564 } 3563 }
3565 if (i == 200) 3564 if (i == 200)
3566 RT_ASSERT(false, ("Another mac power off over time\n")); 3565 RT_ASSERT(false, "Another mac power off over time\n");
3567 } 3566 }
3568} 3567}
3569 3568