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/efuse.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/efuse.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/efuse.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/wireless/rtlwifi/efuse.c b/drivers/net/wireless/rtlwifi/efuse.c index 2885131cf1a0..a079a31b4ed7 100644 --- a/drivers/net/wireless/rtlwifi/efuse.c +++ b/drivers/net/wireless/rtlwifi/efuse.c | |||
@@ -280,7 +280,7 @@ void read_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, u8 *pbuf) | |||
280 | if (*rtemp8 != 0xFF) { | 280 | if (*rtemp8 != 0xFF) { |
281 | efuse_utilized++; | 281 | efuse_utilized++; |
282 | RTPRINT(rtlpriv, FEEPROM, EFUSE_READ_ALL, | 282 | RTPRINT(rtlpriv, FEEPROM, EFUSE_READ_ALL, |
283 | ("Addr=%d\n", efuse_addr)); | 283 | "Addr=%d\n", efuse_addr); |
284 | efuse_addr++; | 284 | efuse_addr++; |
285 | } | 285 | } |
286 | 286 | ||
@@ -290,13 +290,13 @@ void read_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, u8 *pbuf) | |||
290 | if (offset < efuse_max_section) { | 290 | if (offset < efuse_max_section) { |
291 | wren = (*rtemp8 & 0x0f); | 291 | wren = (*rtemp8 & 0x0f); |
292 | RTPRINT(rtlpriv, FEEPROM, EFUSE_READ_ALL, | 292 | RTPRINT(rtlpriv, FEEPROM, EFUSE_READ_ALL, |
293 | ("offset-%d Worden=%x\n", offset, wren)); | 293 | "offset-%d Worden=%x\n", offset, wren); |
294 | 294 | ||
295 | for (i = 0; i < EFUSE_MAX_WORD_UNIT; i++) { | 295 | for (i = 0; i < EFUSE_MAX_WORD_UNIT; i++) { |
296 | if (!(wren & 0x01)) { | 296 | if (!(wren & 0x01)) { |
297 | RTPRINT(rtlpriv, FEEPROM, | 297 | RTPRINT(rtlpriv, FEEPROM, |
298 | EFUSE_READ_ALL, ("Addr=%d\n", | 298 | EFUSE_READ_ALL, |
299 | efuse_addr)); | 299 | "Addr=%d\n", efuse_addr); |
300 | 300 | ||
301 | read_efuse_byte(hw, efuse_addr, rtemp8); | 301 | read_efuse_byte(hw, efuse_addr, rtemp8); |
302 | efuse_addr++; | 302 | efuse_addr++; |
@@ -308,8 +308,8 @@ void read_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, u8 *pbuf) | |||
308 | break; | 308 | break; |
309 | 309 | ||
310 | RTPRINT(rtlpriv, FEEPROM, | 310 | RTPRINT(rtlpriv, FEEPROM, |
311 | EFUSE_READ_ALL, ("Addr=%d\n", | 311 | EFUSE_READ_ALL, |
312 | efuse_addr)); | 312 | "Addr=%d\n", efuse_addr); |
313 | 313 | ||
314 | read_efuse_byte(hw, efuse_addr, rtemp8); | 314 | read_efuse_byte(hw, efuse_addr, rtemp8); |
315 | efuse_addr++; | 315 | efuse_addr++; |
@@ -326,7 +326,7 @@ void read_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, u8 *pbuf) | |||
326 | } | 326 | } |
327 | 327 | ||
328 | RTPRINT(rtlpriv, FEEPROM, EFUSE_READ_ALL, | 328 | RTPRINT(rtlpriv, FEEPROM, EFUSE_READ_ALL, |
329 | ("Addr=%d\n", efuse_addr)); | 329 | "Addr=%d\n", efuse_addr); |
330 | read_efuse_byte(hw, efuse_addr, rtemp8); | 330 | read_efuse_byte(hw, efuse_addr, rtemp8); |
331 | if (*rtemp8 != 0xFF && (efuse_addr < efuse_len)) { | 331 | if (*rtemp8 != 0xFF && (efuse_addr < efuse_len)) { |
332 | efuse_utilized++; | 332 | efuse_utilized++; |
@@ -850,7 +850,7 @@ static void efuse_write_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr, | |||
850 | } | 850 | } |
851 | } | 851 | } |
852 | } | 852 | } |
853 | RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, ("efuse PG_STATE_HEADER-1\n")); | 853 | RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, "efuse PG_STATE_HEADER-1\n"); |
854 | } | 854 | } |
855 | 855 | ||
856 | static void efuse_write_data_case2(struct ieee80211_hw *hw, u16 *efuse_addr, | 856 | static void efuse_write_data_case2(struct ieee80211_hw *hw, u16 *efuse_addr, |
@@ -915,7 +915,7 @@ static void efuse_write_data_case2(struct ieee80211_hw *hw, u16 *efuse_addr, | |||
915 | } | 915 | } |
916 | 916 | ||
917 | RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, | 917 | RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, |
918 | ("efuse PG_STATE_HEADER-2\n")); | 918 | "efuse PG_STATE_HEADER-2\n"); |
919 | } | 919 | } |
920 | } | 920 | } |
921 | 921 | ||
@@ -935,7 +935,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw, | |||
935 | if (efuse_get_current_size(hw) >= | 935 | if (efuse_get_current_size(hw) >= |
936 | (EFUSE_MAX_SIZE - EFUSE_OOB_PROTECT_BYTES)) { | 936 | (EFUSE_MAX_SIZE - EFUSE_OOB_PROTECT_BYTES)) { |
937 | RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, | 937 | RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, |
938 | ("efuse_pg_packet_write error\n")); | 938 | "efuse_pg_packet_write error\n"); |
939 | return false; | 939 | return false; |
940 | } | 940 | } |
941 | 941 | ||
@@ -947,7 +947,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw, | |||
947 | efuse_word_enable_data_read(word_en, data, target_pkt.data); | 947 | efuse_word_enable_data_read(word_en, data, target_pkt.data); |
948 | target_word_cnts = efuse_calculate_word_cnts(target_pkt.word_en); | 948 | target_word_cnts = efuse_calculate_word_cnts(target_pkt.word_en); |
949 | 949 | ||
950 | RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, ("efuse Power ON\n")); | 950 | RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, "efuse Power ON\n"); |
951 | 951 | ||
952 | while (continual && (efuse_addr < | 952 | while (continual && (efuse_addr < |
953 | (EFUSE_MAX_SIZE - EFUSE_OOB_PROTECT_BYTES))) { | 953 | (EFUSE_MAX_SIZE - EFUSE_OOB_PROTECT_BYTES))) { |
@@ -955,7 +955,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw, | |||
955 | if (write_state == PG_STATE_HEADER) { | 955 | if (write_state == PG_STATE_HEADER) { |
956 | badworden = 0x0F; | 956 | badworden = 0x0F; |
957 | RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, | 957 | RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, |
958 | ("efuse PG_STATE_HEADER\n")); | 958 | "efuse PG_STATE_HEADER\n"); |
959 | 959 | ||
960 | if (efuse_one_byte_read(hw, efuse_addr, &efuse_data) && | 960 | if (efuse_one_byte_read(hw, efuse_addr, &efuse_data) && |
961 | (efuse_data != 0xFF)) | 961 | (efuse_data != 0xFF)) |
@@ -975,7 +975,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw, | |||
975 | 975 | ||
976 | } else if (write_state == PG_STATE_DATA) { | 976 | } else if (write_state == PG_STATE_DATA) { |
977 | RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, | 977 | RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, |
978 | ("efuse PG_STATE_DATA\n")); | 978 | "efuse PG_STATE_DATA\n"); |
979 | badworden = | 979 | badworden = |
980 | efuse_word_enable_data_write(hw, efuse_addr + 1, | 980 | efuse_word_enable_data_write(hw, efuse_addr + 1, |
981 | target_pkt.word_en, | 981 | target_pkt.word_en, |
@@ -998,7 +998,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw, | |||
998 | result = false; | 998 | result = false; |
999 | } | 999 | } |
1000 | RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, | 1000 | RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, |
1001 | ("efuse PG_STATE_HEADER-3\n")); | 1001 | "efuse PG_STATE_HEADER-3\n"); |
1002 | } | 1002 | } |
1003 | } | 1003 | } |
1004 | } | 1004 | } |