Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtlwifi: Convert printks to pr_<level>

Use the current logging styles.
Add pr_fmt where appropriate.
Remove now unnecessary prefixes from printks.
Convert hard coded prefix to __func__.
Add a missing "\n" to a format.

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>

authored by

Joe Perches and committed by
John W. Linville
292b1192 6054069a

+72 -71
+5 -4
drivers/net/wireless/rtlwifi/base.c
··· 27 27 * 28 28 *****************************************************************************/ 29 29 30 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 31 + 30 32 #include <linux/ip.h> 31 33 #include "wifi.h" 32 34 #include "rc.h" ··· 399 397 radio_state = rtlpriv->cfg->ops->radio_onoff_checking(hw, &valid); 400 398 401 399 if (valid) { 402 - printk(KERN_INFO "rtlwifi: wireless switch is %s\n", 403 - rtlpriv->rfkill.rfkill_state ? "on" : "off"); 400 + pr_info("wireless switch is %s\n", 401 + rtlpriv->rfkill.rfkill_state ? "on" : "off"); 404 402 405 403 rtlpriv->rfkill.rfkill_state = radio_state; 406 404 ··· 1403 1401 static int __init rtl_core_module_init(void) 1404 1402 { 1405 1403 if (rtl_rate_control_register()) 1406 - printk(KERN_ERR "rtlwifi: Unable to register rtl_rc," 1407 - "use default RC !!\n"); 1404 + pr_err("Unable to register rtl_rc, use default RC !!\n"); 1408 1405 1409 1406 return 0; 1410 1407 }
+3 -1
drivers/net/wireless/rtlwifi/cam.c
··· 27 27 * 28 28 *****************************************************************************/ 29 29 30 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 31 + 30 32 #include "wifi.h" 31 33 #include "cam.h" 32 34 ··· 349 347 /* Remove from HW Security CAM */ 350 348 memset(rtlpriv->sec.hwsec_cam_sta_addr[i], 0, ETH_ALEN); 351 349 rtlpriv->sec.hwsec_cam_bitmap &= ~(BIT(0) << i); 352 - printk(KERN_INFO "&&&&&&&&&del entry %d\n", i); 350 + pr_info("&&&&&&&&&del entry %d\n", i); 353 351 } 354 352 } 355 353 return;
+3 -2
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
··· 27 27 * 28 28 *****************************************************************************/ 29 29 30 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 31 + 30 32 #include <linux/firmware.h> 31 33 #include "../wifi.h" 32 34 #include "../pci.h" ··· 226 224 u32 fwsize; 227 225 enum version_8192c version = rtlhal->version; 228 226 229 - printk(KERN_INFO "rtl8192c: Loading firmware file %s\n", 230 - rtlpriv->cfg->fw_name); 227 + pr_info("Loading firmware file %s\n", rtlpriv->cfg->fw_name); 231 228 if (!rtlhal->pfirmware) 232 229 return 1; 233 230
+28 -41
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
··· 27 27 * 28 28 *****************************************************************************/ 29 29 30 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 31 + 30 32 #include "../wifi.h" 31 33 #include "../efuse.h" 32 34 #include "../base.h" ··· 339 337 rtlefuse->board_type = boardType; 340 338 if (IS_HIGHT_PA(rtlefuse->board_type)) 341 339 rtlefuse->external_pa = 1; 342 - printk(KERN_INFO "rtl8192cu: Board Type %x\n", rtlefuse->board_type); 340 + pr_info("Board Type %x\n", rtlefuse->board_type); 343 341 344 342 #ifdef CONFIG_ANTENNA_DIVERSITY 345 343 /* Antenna Diversity setting. */ ··· 348 346 else 349 347 rtl_efuse->antenna_cfg = registry_par->antdiv_cfg; /* 0:OFF, */ 350 348 351 - printk(KERN_INFO "rtl8192cu: Antenna Config %x\n", 352 - rtl_efuse->antenna_cfg); 349 + pr_info("Antenna Config %x\n", rtl_efuse->antenna_cfg); 353 350 #endif 354 351 } 355 352 ··· 385 384 pbtpriv->bBTNonTrafficModeSet = _FALSE; 386 385 pbtpriv->CurrentState = 0; 387 386 pbtpriv->PreviousState = 0; 388 - printk(KERN_INFO "rtl8192cu: BT Coexistance = %s\n", 389 - (pbtpriv->BT_Coexist == _TRUE) ? "enable" : "disable"); 387 + pr_info("BT Coexistance = %s\n", 388 + (pbtpriv->BT_Coexist == _TRUE) ? "enable" : "disable"); 390 389 if (pbtpriv->BT_Coexist) { 391 390 if (pbtpriv->BT_Ant_Num == Ant_x2) 392 - printk(KERN_INFO "rtl8192cu: BlueTooth BT_" 393 - "Ant_Num = Antx2\n"); 391 + pr_info("BlueTooth BT_Ant_Num = Antx2\n"); 394 392 else if (pbtpriv->BT_Ant_Num == Ant_x1) 395 - printk(KERN_INFO "rtl8192cu: BlueTooth BT_" 396 - "Ant_Num = Antx1\n"); 393 + pr_info("BlueTooth BT_Ant_Num = Antx1\n"); 397 394 switch (pbtpriv->BT_CoexistType) { 398 395 case BT_2Wire: 399 - printk(KERN_INFO "rtl8192cu: BlueTooth BT_" 400 - "CoexistType = BT_2Wire\n"); 396 + pr_info("BlueTooth BT_CoexistType = BT_2Wire\n"); 401 397 break; 402 398 case BT_ISSC_3Wire: 403 - printk(KERN_INFO "rtl8192cu: BlueTooth BT_" 404 - "CoexistType = BT_ISSC_3Wire\n"); 399 + pr_info("BlueTooth BT_CoexistType = BT_ISSC_3Wire\n"); 405 400 break; 406 401 case BT_Accel: 407 - printk(KERN_INFO "rtl8192cu: BlueTooth BT_" 408 - "CoexistType = BT_Accel\n"); 402 + pr_info("BlueTooth BT_CoexistType = BT_Accel\n"); 409 403 break; 410 404 case BT_CSR_BC4: 411 - printk(KERN_INFO "rtl8192cu: BlueTooth BT_" 412 - "CoexistType = BT_CSR_BC4\n"); 405 + pr_info("BlueTooth BT_CoexistType = BT_CSR_BC4\n"); 413 406 break; 414 407 case BT_CSR_BC8: 415 - printk(KERN_INFO "rtl8192cu: BlueTooth BT_" 416 - "CoexistType = BT_CSR_BC8\n"); 408 + pr_info("BlueTooth BT_CoexistType = BT_CSR_BC8\n"); 417 409 break; 418 410 case BT_RTL8756: 419 - printk(KERN_INFO "rtl8192cu: BlueTooth BT_" 420 - "CoexistType = BT_RTL8756\n"); 411 + pr_info("BlueTooth BT_CoexistType = BT_RTL8756\n"); 421 412 break; 422 413 default: 423 - printk(KERN_INFO "rtl8192cu: BlueTooth BT_" 424 - "CoexistType = Unknown\n"); 414 + pr_info("BlueTooth BT_CoexistType = Unknown\n"); 425 415 break; 426 416 } 427 - printk(KERN_INFO "rtl8192cu: BlueTooth BT_Ant_isolation = %d\n", 428 - pbtpriv->BT_Ant_isolation); 417 + pr_info("BlueTooth BT_Ant_isolation = %d\n", 418 + pbtpriv->BT_Ant_isolation); 429 419 switch (pbtpriv->BT_Service) { 430 420 case BT_OtherAction: 431 - printk(KERN_INFO "rtl8192cu: BlueTooth BT_Service = " 432 - "BT_OtherAction\n"); 421 + pr_info("BlueTooth BT_Service = BT_OtherAction\n"); 433 422 break; 434 423 case BT_SCO: 435 - printk(KERN_INFO "rtl8192cu: BlueTooth BT_Service = " 436 - "BT_SCO\n"); 424 + pr_info("BlueTooth BT_Service = BT_SCO\n"); 437 425 break; 438 426 case BT_Busy: 439 - printk(KERN_INFO "rtl8192cu: BlueTooth BT_Service = " 440 - "BT_Busy\n"); 427 + pr_info("BlueTooth BT_Service = BT_Busy\n"); 441 428 break; 442 429 case BT_OtherBusy: 443 - printk(KERN_INFO "rtl8192cu: BlueTooth BT_Service = " 444 - "BT_OtherBusy\n"); 430 + pr_info("BlueTooth BT_Service = BT_OtherBusy\n"); 445 431 break; 446 432 default: 447 - printk(KERN_INFO "rtl8192cu: BlueTooth BT_Service = " 448 - "BT_Idle\n"); 433 + pr_info("BlueTooth BT_Service = BT_Idle\n"); 449 434 break; 450 435 } 451 - printk(KERN_INFO "rtl8192cu: BT_RadioSharedType = 0x%x\n", 452 - pbtpriv->BT_RadioSharedType); 436 + pr_info("BT_RadioSharedType = 0x%x\n", 437 + pbtpriv->BT_RadioSharedType); 453 438 } 454 439 } 455 440 ··· 513 526 usvalue = *(u16 *)&hwinfo[EEPROM_MAC_ADDR + i]; 514 527 *((u16 *) (&rtlefuse->dev_addr[i])) = usvalue; 515 528 } 516 - printk(KERN_INFO "rtl8192cu: MAC address: %pM\n", rtlefuse->dev_addr); 529 + pr_info("MAC address: %pM\n", rtlefuse->dev_addr); 517 530 _rtl92cu_read_txpower_info_from_hwpg(hw, 518 531 rtlefuse->autoload_failflag, hwinfo); 519 532 rtlefuse->eeprom_vid = *(u16 *)&hwinfo[EEPROM_VID]; ··· 652 665 rtl_write_word(rtlpriv, REG_APS_FSMCO, value16); 653 666 do { 654 667 if (!(rtl_read_word(rtlpriv, REG_APS_FSMCO) & APFM_ONMAC)) { 655 - printk(KERN_INFO "rtl8192cu: MAC auto ON okay!\n"); 668 + pr_info("MAC auto ON okay!\n"); 656 669 break; 657 670 } 658 671 if (pollingCount++ > 100) { ··· 806 819 } 807 820 _rtl92c_init_chipN_reg_priority(hw, value, value, value, value, 808 821 value, value); 809 - printk(KERN_INFO "rtl8192cu: Tx queue select: 0x%02x\n", queue_sel); 822 + pr_info("Tx queue select: 0x%02x\n", queue_sel); 810 823 } 811 824 812 825 static void _rtl92cu_init_chipN_two_out_ep_priority(struct ieee80211_hw *hw, ··· 850 863 hiQ = valueHi; 851 864 } 852 865 _rtl92c_init_chipN_reg_priority(hw, beQ, bkQ, viQ, voQ, mgtQ, hiQ); 853 - printk(KERN_INFO "rtl8192cu: Tx queue select: 0x%02x\n", queue_sel); 866 + pr_info("Tx queue select: 0x%02x\n", queue_sel); 854 867 } 855 868 856 869 static void _rtl92cu_init_chipN_three_out_ep_priority(struct ieee80211_hw *hw,
+7 -4
drivers/net/wireless/rtlwifi/rtl8192cu/mac.c
··· 26 26 * Larry Finger <Larry.Finger@lwfinger.net> 27 27 * 28 28 ****************************************************************************/ 29 + 30 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 31 + 29 32 #include <linux/module.h> 30 33 31 34 #include "../wifi.h" ··· 216 213 for (i = 0; i < (boundary - 1); i++) { 217 214 rst = rtl92c_llt_write(hw, i , i + 1); 218 215 if (true != rst) { 219 - printk(KERN_ERR "===> %s #1 fail\n", __func__); 216 + pr_err("===> %s #1 fail\n", __func__); 220 217 return rst; 221 218 } 222 219 } 223 220 /* end of list */ 224 221 rst = rtl92c_llt_write(hw, (boundary - 1), 0xFF); 225 222 if (true != rst) { 226 - printk(KERN_ERR "===> %s #2 fail\n", __func__); 223 + pr_err("===> %s #2 fail\n", __func__); 227 224 return rst; 228 225 } 229 226 /* Make the other pages as ring buffer ··· 234 231 for (i = boundary; i < LLT_LAST_ENTRY_OF_TX_PKT_BUFFER; i++) { 235 232 rst = rtl92c_llt_write(hw, i, (i + 1)); 236 233 if (true != rst) { 237 - printk(KERN_ERR "===> %s #3 fail\n", __func__); 234 + pr_err("===> %s #3 fail\n", __func__); 238 235 return rst; 239 236 } 240 237 } 241 238 /* Let last entry point to the start entry of ring buffer */ 242 239 rst = rtl92c_llt_write(hw, LLT_LAST_ENTRY_OF_TX_PKT_BUFFER, boundary); 243 240 if (true != rst) { 244 - printk(KERN_ERR "===> %s #4 fail\n", __func__); 241 + pr_err("===> %s #4 fail\n", __func__); 245 242 return rst; 246 243 } 247 244 return rst;
+4 -4
drivers/net/wireless/rtlwifi/rtl8192de/sw.c
··· 27 27 * 28 28 *****************************************************************************/ 29 29 30 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 31 + 30 32 #include <linux/vmalloc.h> 31 33 32 34 #include "../wifi.h" ··· 172 170 } 173 171 174 172 if (!header_print) { 175 - printk(KERN_INFO "rtl8192de: Driver for Realtek RTL8192DE" 176 - " WLAN interface"); 177 - printk(KERN_INFO "rtl8192de: Loading firmware file %s\n", 178 - rtlpriv->cfg->fw_name); 173 + pr_info("Driver for Realtek RTL8192DE WLAN interface\n"); 174 + pr_info("Loading firmware file %s\n", rtlpriv->cfg->fw_name); 179 175 header_print++; 180 176 } 181 177 /* request fw */
+5 -5
drivers/net/wireless/rtlwifi/rtl8192se/hw.c
··· 27 27 * 28 28 *****************************************************************************/ 29 29 30 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 31 + 30 32 #include "../wifi.h" 31 33 #include "../efuse.h" 32 34 #include "../base.h" ··· 467 465 if ((tmpvalue & BIT(6))) 468 466 break; 469 467 470 - printk(KERN_ERR "wait for BIT(6) return value %x\n", 471 - tmpvalue); 468 + pr_err("wait for BIT(6) return value %x\n", tmpvalue); 472 469 if (waitcount == 0) 473 470 break; 474 471 ··· 1256 1255 if ((tmp & BIT(6))) 1257 1256 break; 1258 1257 1259 - printk(KERN_ERR "wait for BIT(6) return value %x\n", 1260 - tmp); 1258 + pr_err("wait for BIT(6) return value %x\n", tmp); 1261 1259 1262 1260 if (waitcnt == 0) 1263 1261 break; ··· 1315 1315 if (u1btmp & BIT(7)) { 1316 1316 u1btmp &= ~(BIT(6) | BIT(7)); 1317 1317 if (!_rtl92s_set_sysclk(hw, u1btmp)) { 1318 - printk(KERN_ERR "Switch ctrl path fail\n"); 1318 + pr_err("Switch ctrl path fail\n"); 1319 1319 return; 1320 1320 } 1321 1321 }
+3 -2
drivers/net/wireless/rtlwifi/rtl8192se/phy.c
··· 27 27 * 28 28 *****************************************************************************/ 29 29 30 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 31 + 30 32 #include "../wifi.h" 31 33 #include "../pci.h" 32 34 #include "../ps.h" ··· 1018 1016 rtstatus = _rtl92s_phy_config_bb(hw, BASEBAND_CONFIG_AGC_TAB); 1019 1017 1020 1018 if (rtstatus != true) { 1021 - printk(KERN_ERR "_rtl92s_phy_bb_config_parafile(): " 1022 - "AGC Table Fail\n"); 1019 + pr_err("%s(): AGC Table Fail\n", __func__); 1023 1020 goto phy_BB8190_Config_ParaFile_Fail; 1024 1021 } 1025 1022
+3 -1
drivers/net/wireless/rtlwifi/rtl8192se/rf.c
··· 27 27 * 28 28 *****************************************************************************/ 29 29 30 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 31 + 30 32 #include "../wifi.h" 31 33 #include "reg.h" 32 34 #include "def.h" ··· 509 507 } 510 508 511 509 if (rtstatus != true) { 512 - printk(KERN_ERR "Radio[%d] Fail!!", rfpath); 510 + pr_err("Radio[%d] Fail!!\n", rfpath); 513 511 goto fail; 514 512 } 515 513
+4 -2
drivers/net/wireless/rtlwifi/rtl8192se/sw.c
··· 27 27 * 28 28 *****************************************************************************/ 29 29 30 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 31 + 30 32 #include <linux/vmalloc.h> 31 33 32 34 #include "../wifi.h" ··· 185 183 return 1; 186 184 } 187 185 188 - printk(KERN_INFO "rtl8192se: Driver for Realtek RTL8192SE/RTL8191SE\n" 189 - " Loading firmware %s\n", rtlpriv->cfg->fw_name); 186 + pr_info("Driver for Realtek RTL8192SE/RTL8191SE\n" 187 + "Loading firmware %s\n", rtlpriv->cfg->fw_name); 190 188 /* request fw */ 191 189 err = request_firmware(&firmware, rtlpriv->cfg->fw_name, 192 190 rtlpriv->io.dev);
+7 -5
drivers/net/wireless/rtlwifi/usb.c
··· 24 24 * Hsinchu 300, Taiwan. 25 25 * 26 26 *****************************************************************************/ 27 + 28 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 29 + 27 30 #include <linux/usb.h> 28 31 #include "core.h" 29 32 #include "wifi.h" ··· 107 104 pdata, len, 0); /* max. timeout */ 108 105 109 106 if (status < 0) 110 - printk(KERN_ERR "reg 0x%x, usbctrl_vendorreq TimeOut! " 111 - "status:0x%x value=0x%x\n", value, status, 112 - *(u32 *)pdata); 107 + pr_err("reg 0x%x, usbctrl_vendorreq TimeOut! status:0x%x value=0x%x\n", 108 + value, status, *(u32 *)pdata); 113 109 return status; 114 110 } 115 111 ··· 318 316 rtlusb->usb_rx_segregate_hdl = 319 317 rtlpriv->cfg->usb_interface_cfg->usb_rx_segregate_hdl; 320 318 321 - printk(KERN_INFO "rtl8192cu: rx_max_size %d, rx_urb_num %d, in_ep %d\n", 319 + pr_info("rx_max_size %d, rx_urb_num %d, in_ep %d\n", 322 320 rtlusb->rx_max_size, rtlusb->rx_urb_num, rtlusb->in_ep); 323 321 init_usb_anchor(&rtlusb->rx_submitted); 324 322 return 0; ··· 582 580 } else{ 583 581 /* TO DO */ 584 582 _rtl_rx_pre_process(hw, skb); 585 - printk(KERN_ERR "rtlwifi: rx agg not supported\n"); 583 + pr_err("rx agg not supported\n"); 586 584 } 587 585 goto resubmit; 588 586 }