diff options
author | Joe Perches <joe@perches.com> | 2012-01-04 22:40:42 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-24 14:07:40 -0500 |
commit | 4c48869f5d6e4ee4a773fd67a01e1b934faa57f8 (patch) | |
tree | 878d8c265368820db9dd2e24ec834f213ce31063 /drivers/net/wireless/rtlwifi/rtl8192se/hw.c | |
parent | f30d7507a8116e2099a9135c873411db8c0a3dc6 (diff) |
rtlwifi: Convert RTPRINT macro to use ##__VA_ARGS__
Consolidate printks to avoid possible message interleaving
and reduce the object size.
Remove unnecessary RTPRINT parentheses.
Coalesce formats.
Align arguments.
$ size drivers/net/wireless/rtlwifi/built-in.o*
text data bss dec hex filename
590002 55333 127560 772895 bcb1f drivers/net/wireless/rtlwifi/built-in.o.new
594841 55333 129680 779854 be64e 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/rtl8192se/hw.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 85 |
1 files changed, 43 insertions, 42 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c index dffcafe01a39..acab8781cc7e 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c | |||
@@ -1704,23 +1704,24 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) | |||
1704 | for (rf_path = 0; rf_path < 2; rf_path++) | 1704 | for (rf_path = 0; rf_path < 2; rf_path++) |
1705 | for (i = 0; i < 3; i++) | 1705 | for (i = 0; i < 3; i++) |
1706 | RTPRINT(rtlpriv, FINIT, INIT_EEPROM, | 1706 | RTPRINT(rtlpriv, FINIT, INIT_EEPROM, |
1707 | ("RF(%d) EEPROM CCK Area(%d) = 0x%x\n", rf_path, | 1707 | "RF(%d) EEPROM CCK Area(%d) = 0x%x\n", |
1708 | i, rtlefuse->eeprom_chnlarea_txpwr_cck | 1708 | rf_path, i, |
1709 | [rf_path][i])); | 1709 | rtlefuse->eeprom_chnlarea_txpwr_cck |
1710 | [rf_path][i]); | ||
1710 | for (rf_path = 0; rf_path < 2; rf_path++) | 1711 | for (rf_path = 0; rf_path < 2; rf_path++) |
1711 | for (i = 0; i < 3; i++) | 1712 | for (i = 0; i < 3; i++) |
1712 | RTPRINT(rtlpriv, FINIT, INIT_EEPROM, | 1713 | RTPRINT(rtlpriv, FINIT, INIT_EEPROM, |
1713 | ("RF(%d) EEPROM HT40 1S Area(%d) = 0x%x\n", | 1714 | "RF(%d) EEPROM HT40 1S Area(%d) = 0x%x\n", |
1714 | rf_path, i, | 1715 | rf_path, i, |
1715 | rtlefuse->eeprom_chnlarea_txpwr_ht40_1s | 1716 | rtlefuse->eeprom_chnlarea_txpwr_ht40_1s |
1716 | [rf_path][i])); | 1717 | [rf_path][i]); |
1717 | for (rf_path = 0; rf_path < 2; rf_path++) | 1718 | for (rf_path = 0; rf_path < 2; rf_path++) |
1718 | for (i = 0; i < 3; i++) | 1719 | for (i = 0; i < 3; i++) |
1719 | RTPRINT(rtlpriv, FINIT, INIT_EEPROM, | 1720 | RTPRINT(rtlpriv, FINIT, INIT_EEPROM, |
1720 | ("RF(%d) EEPROM HT40 2S Diff Area(%d) = 0x%x\n", | 1721 | "RF(%d) EEPROM HT40 2S Diff Area(%d) = 0x%x\n", |
1721 | rf_path, i, | 1722 | rf_path, i, |
1722 | rtlefuse->eeprom_chnlarea_txpwr_ht40_2sdiif | 1723 | rtlefuse->eeprom_chnlarea_txpwr_ht40_2sdiif |
1723 | [rf_path][i])); | 1724 | [rf_path][i]); |
1724 | 1725 | ||
1725 | for (rf_path = 0; rf_path < 2; rf_path++) { | 1726 | for (rf_path = 0; rf_path < 2; rf_path++) { |
1726 | 1727 | ||
@@ -1751,11 +1752,11 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) | |||
1751 | 1752 | ||
1752 | for (i = 0; i < 14; i++) { | 1753 | for (i = 0; i < 14; i++) { |
1753 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1754 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1754 | ("RF(%d)-Ch(%d) [CCK / HT40_1S / HT40_2S] = " | 1755 | "RF(%d)-Ch(%d) [CCK / HT40_1S / HT40_2S] = [0x%x / 0x%x / 0x%x]\n", |
1755 | "[0x%x / 0x%x / 0x%x]\n", rf_path, i, | 1756 | rf_path, i, |
1756 | rtlefuse->txpwrlevel_cck[rf_path][i], | 1757 | rtlefuse->txpwrlevel_cck[rf_path][i], |
1757 | rtlefuse->txpwrlevel_ht40_1s[rf_path][i], | 1758 | rtlefuse->txpwrlevel_ht40_1s[rf_path][i], |
1758 | rtlefuse->txpwrlevel_ht40_2s[rf_path][i])); | 1759 | rtlefuse->txpwrlevel_ht40_2s[rf_path][i]); |
1759 | } | 1760 | } |
1760 | } | 1761 | } |
1761 | 1762 | ||
@@ -1788,13 +1789,13 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) | |||
1788 | 0xf0) >> 4); | 1789 | 0xf0) >> 4); |
1789 | 1790 | ||
1790 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1791 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1791 | ("RF-%d pwrgroup_ht20[%d] = 0x%x\n", | 1792 | "RF-%d pwrgroup_ht20[%d] = 0x%x\n", |
1792 | rf_path, i, | 1793 | rf_path, i, |
1793 | rtlefuse->pwrgroup_ht20[rf_path][i])); | 1794 | rtlefuse->pwrgroup_ht20[rf_path][i]); |
1794 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1795 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1795 | ("RF-%d pwrgroup_ht40[%d] = 0x%x\n", | 1796 | "RF-%d pwrgroup_ht40[%d] = 0x%x\n", |
1796 | rf_path, i, | 1797 | rf_path, i, |
1797 | rtlefuse->pwrgroup_ht40[rf_path][i])); | 1798 | rtlefuse->pwrgroup_ht40[rf_path][i]); |
1798 | } | 1799 | } |
1799 | } | 1800 | } |
1800 | 1801 | ||
@@ -1849,27 +1850,27 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) | |||
1849 | (hwinfo[EEPROM_REGULATORY] & 0x1); | 1850 | (hwinfo[EEPROM_REGULATORY] & 0x1); |
1850 | } | 1851 | } |
1851 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1852 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1852 | ("eeprom_regulatory = 0x%x\n", rtlefuse->eeprom_regulatory)); | 1853 | "eeprom_regulatory = 0x%x\n", rtlefuse->eeprom_regulatory); |
1853 | 1854 | ||
1854 | for (i = 0; i < 14; i++) | 1855 | for (i = 0; i < 14; i++) |
1855 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1856 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1856 | ("RF-A Ht20 to HT40 Diff[%d] = 0x%x\n", i, | 1857 | "RF-A Ht20 to HT40 Diff[%d] = 0x%x\n", |
1857 | rtlefuse->txpwr_ht20diff[RF90_PATH_A][i])); | 1858 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_A][i]); |
1858 | for (i = 0; i < 14; i++) | 1859 | for (i = 0; i < 14; i++) |
1859 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1860 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1860 | ("RF-A Legacy to Ht40 Diff[%d] = 0x%x\n", i, | 1861 | "RF-A Legacy to Ht40 Diff[%d] = 0x%x\n", |
1861 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][i])); | 1862 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][i]); |
1862 | for (i = 0; i < 14; i++) | 1863 | for (i = 0; i < 14; i++) |
1863 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1864 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1864 | ("RF-B Ht20 to HT40 Diff[%d] = 0x%x\n", i, | 1865 | "RF-B Ht20 to HT40 Diff[%d] = 0x%x\n", |
1865 | rtlefuse->txpwr_ht20diff[RF90_PATH_B][i])); | 1866 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_B][i]); |
1866 | for (i = 0; i < 14; i++) | 1867 | for (i = 0; i < 14; i++) |
1867 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1868 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1868 | ("RF-B Legacy to HT40 Diff[%d] = 0x%x\n", i, | 1869 | "RF-B Legacy to HT40 Diff[%d] = 0x%x\n", |
1869 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_B][i])); | 1870 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_B][i]); |
1870 | 1871 | ||
1871 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, ("TxPwrSafetyFlag = %d\n", | 1872 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1872 | rtlefuse->txpwr_safetyflag)); | 1873 | "TxPwrSafetyFlag = %d\n", rtlefuse->txpwr_safetyflag); |
1873 | 1874 | ||
1874 | /* Read RF-indication and Tx Power gain | 1875 | /* Read RF-indication and Tx Power gain |
1875 | * index diff of legacy to HT OFDM rate. */ | 1876 | * index diff of legacy to HT OFDM rate. */ |
@@ -1878,8 +1879,8 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) | |||
1878 | rtlefuse->legacy_httxpowerdiff = | 1879 | rtlefuse->legacy_httxpowerdiff = |
1879 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][0]; | 1880 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][0]; |
1880 | 1881 | ||
1881 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, ("TxPowerDiff = %#x\n", | 1882 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1882 | rtlefuse->eeprom_txpowerdiff)); | 1883 | "TxPowerDiff = %#x\n", rtlefuse->eeprom_txpowerdiff); |
1883 | 1884 | ||
1884 | /* Get TSSI value for each path. */ | 1885 | /* Get TSSI value for each path. */ |
1885 | usvalue = *(u16 *)&hwinfo[EEPROM_TSSI_A]; | 1886 | usvalue = *(u16 *)&hwinfo[EEPROM_TSSI_A]; |
@@ -1887,16 +1888,16 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) | |||
1887 | usvalue = *(u8 *)&hwinfo[EEPROM_TSSI_B]; | 1888 | usvalue = *(u8 *)&hwinfo[EEPROM_TSSI_B]; |
1888 | rtlefuse->eeprom_tssi[RF90_PATH_B] = (u8)(usvalue & 0xff); | 1889 | rtlefuse->eeprom_tssi[RF90_PATH_B] = (u8)(usvalue & 0xff); |
1889 | 1890 | ||
1890 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, ("TSSI_A = 0x%x, TSSI_B = 0x%x\n", | 1891 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, "TSSI_A = 0x%x, TSSI_B = 0x%x\n", |
1891 | rtlefuse->eeprom_tssi[RF90_PATH_A], | 1892 | rtlefuse->eeprom_tssi[RF90_PATH_A], |
1892 | rtlefuse->eeprom_tssi[RF90_PATH_B])); | 1893 | rtlefuse->eeprom_tssi[RF90_PATH_B]); |
1893 | 1894 | ||
1894 | /* Read antenna tx power offset of B/C/D to A from EEPROM */ | 1895 | /* Read antenna tx power offset of B/C/D to A from EEPROM */ |
1895 | /* and read ThermalMeter from EEPROM */ | 1896 | /* and read ThermalMeter from EEPROM */ |
1896 | tempval = *(u8 *)&hwinfo[EEPROM_THERMALMETER]; | 1897 | tempval = *(u8 *)&hwinfo[EEPROM_THERMALMETER]; |
1897 | rtlefuse->eeprom_thermalmeter = tempval; | 1898 | rtlefuse->eeprom_thermalmeter = tempval; |
1898 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, ("thermalmeter = 0x%x\n", | 1899 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1899 | rtlefuse->eeprom_thermalmeter)); | 1900 | "thermalmeter = 0x%x\n", rtlefuse->eeprom_thermalmeter); |
1900 | 1901 | ||
1901 | /* ThermalMeter, BIT(0)~3 for RFIC1, BIT(4)~7 for RFIC2 */ | 1902 | /* ThermalMeter, BIT(0)~3 for RFIC1, BIT(4)~7 for RFIC2 */ |
1902 | rtlefuse->thermalmeter[0] = (rtlefuse->eeprom_thermalmeter & 0x1f); | 1903 | rtlefuse->thermalmeter[0] = (rtlefuse->eeprom_thermalmeter & 0x1f); |
@@ -1912,8 +1913,8 @@ static void _rtl92se_read_adapter_info(struct ieee80211_hw *hw) | |||
1912 | /* Version ID, Channel plan */ | 1913 | /* Version ID, Channel plan */ |
1913 | rtlefuse->eeprom_channelplan = *(u8 *)&hwinfo[EEPROM_CHANNELPLAN]; | 1914 | rtlefuse->eeprom_channelplan = *(u8 *)&hwinfo[EEPROM_CHANNELPLAN]; |
1914 | rtlefuse->txpwr_fromeprom = true; | 1915 | rtlefuse->txpwr_fromeprom = true; |
1915 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, ("EEPROM ChannelPlan = 0x%4x\n", | 1916 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1916 | rtlefuse->eeprom_channelplan)); | 1917 | "EEPROM ChannelPlan = 0x%4x\n", rtlefuse->eeprom_channelplan); |
1917 | 1918 | ||
1918 | /* Read Customer ID or Board Type!!! */ | 1919 | /* Read Customer ID or Board Type!!! */ |
1919 | tempval = *(u8 *)&hwinfo[EEPROM_BOARDTYPE]; | 1920 | tempval = *(u8 *)&hwinfo[EEPROM_BOARDTYPE]; |