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

brcm80211: Use pr_fmt and pr_<level>

Convert printks to pr_<level>
Prefix logging with pr_fmt.
Use ##__VA_ARGS__ in some WL_ logging macros.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Joe Perches and committed by
John W. Linville
02f77195 c2e6d5ab

+46 -24
+2
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
··· 15 15 */ 16 16 /* ****************** SDIO CARD Interface Functions **************************/ 17 17 18 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 19 + 18 20 #include <linux/types.h> 19 21 #include <linux/netdevice.h> 20 22 #include <linux/export.h>
+3
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
··· 13 13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 14 14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 15 */ 16 + 17 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 18 + 16 19 #include <linux/types.h> 17 20 #include <linux/netdevice.h> 18 21 #include <linux/mmc/sdio.h>
+2
drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c
··· 19 19 * For certain dcmd codes, the dongle interprets string data from the host. 20 20 ******************************************************************************/ 21 21 22 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 23 + 22 24 #include <linux/types.h> 23 25 #include <linux/netdevice.h> 24 26 #include <linux/sched.h>
+3
drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
··· 13 13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 14 14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 15 */ 16 + 17 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 18 + 16 19 #include <linux/kernel.h> 17 20 #include <linux/string.h> 18 21 #include <linux/sched.h>
+2
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
··· 14 14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 15 */ 16 16 17 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 18 + 17 19 #include <linux/init.h> 18 20 #include <linux/kernel.h> 19 21 #include <linux/kthread.h>
+4 -4
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
··· 14 14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 15 */ 16 16 17 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 18 + 17 19 #include <linux/types.h> 18 20 #include <linux/kernel.h> 19 21 #include <linux/kthread.h> ··· 3898 3896 bus->watchdog_tsk = kthread_run(brcmf_sdbrcm_watchdog_thread, 3899 3897 bus, "brcmf_watchdog"); 3900 3898 if (IS_ERR(bus->watchdog_tsk)) { 3901 - printk(KERN_WARNING 3902 - "brcmf_watchdog thread failed to start\n"); 3899 + pr_warn("brcmf_watchdog thread failed to start\n"); 3903 3900 bus->watchdog_tsk = NULL; 3904 3901 } 3905 3902 /* Initialize DPC thread */ ··· 3906 3905 bus->dpc_tsk = kthread_run(brcmf_sdbrcm_dpc_thread, 3907 3906 bus, "brcmf_dpc"); 3908 3907 if (IS_ERR(bus->dpc_tsk)) { 3909 - printk(KERN_WARNING 3910 - "brcmf_dpc thread failed to start\n"); 3908 + pr_warn("brcmf_dpc thread failed to start\n"); 3911 3909 bus->dpc_tsk = NULL; 3912 3910 } 3913 3911
+2
drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c
··· 15 15 */ 16 16 /* ***** SDIO interface chip backplane handle functions ***** */ 17 17 18 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 19 + 18 20 #include <linux/types.h> 19 21 #include <linux/netdevice.h> 20 22 #include <linux/mmc/card.h>
+2
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
··· 16 16 17 17 /* Toplevel file. Relies on dhd_linux.c to send commands to the dongle. */ 18 18 19 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 20 + 19 21 #include <linux/kernel.h> 20 22 #include <linux/if_arp.h> 21 23 #include <linux/sched.h>
+15 -15
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
··· 32 32 #define WL_DBG_MASK ((WL_DBG_INFO | WL_DBG_ERR | WL_DBG_TRACE) | \ 33 33 (WL_DBG_SCAN) | (WL_DBG_CONN)) 34 34 35 - #define WL_ERR(fmt, args...) \ 35 + #define WL_ERR(fmt, ...) \ 36 36 do { \ 37 37 if (brcmf_dbg_level & WL_DBG_ERR) { \ 38 38 if (net_ratelimit()) { \ 39 - printk(KERN_ERR "ERROR @%s : " fmt, \ 40 - __func__, ##args); \ 39 + pr_err("ERROR @%s : " fmt, \ 40 + __func__, ##__VA_ARGS__); \ 41 41 } \ 42 42 } \ 43 43 } while (0) 44 44 45 45 #if (defined DEBUG) 46 - #define WL_INFO(fmt, args...) \ 46 + #define WL_INFO(fmt, ...) \ 47 47 do { \ 48 48 if (brcmf_dbg_level & WL_DBG_INFO) { \ 49 49 if (net_ratelimit()) { \ 50 - printk(KERN_ERR "INFO @%s : " fmt, \ 51 - __func__, ##args); \ 50 + pr_err("INFO @%s : " fmt, \ 51 + __func__, ##__VA_ARGS__); \ 52 52 } \ 53 53 } \ 54 54 } while (0) 55 55 56 - #define WL_TRACE(fmt, args...) \ 56 + #define WL_TRACE(fmt, ...) \ 57 57 do { \ 58 58 if (brcmf_dbg_level & WL_DBG_TRACE) { \ 59 59 if (net_ratelimit()) { \ 60 - printk(KERN_ERR "TRACE @%s : " fmt, \ 61 - __func__, ##args); \ 60 + pr_err("TRACE @%s : " fmt, \ 61 + __func__, ##__VA_ARGS__); \ 62 62 } \ 63 63 } \ 64 64 } while (0) 65 65 66 - #define WL_SCAN(fmt, args...) \ 66 + #define WL_SCAN(fmt, ...) \ 67 67 do { \ 68 68 if (brcmf_dbg_level & WL_DBG_SCAN) { \ 69 69 if (net_ratelimit()) { \ 70 - printk(KERN_ERR "SCAN @%s : " fmt, \ 71 - __func__, ##args); \ 70 + pr_err("SCAN @%s : " fmt, \ 71 + __func__, ##__VA_ARGS__); \ 72 72 } \ 73 73 } \ 74 74 } while (0) 75 75 76 - #define WL_CONN(fmt, args...) \ 76 + #define WL_CONN(fmt, ...) \ 77 77 do { \ 78 78 if (brcmf_dbg_level & WL_DBG_CONN) { \ 79 79 if (net_ratelimit()) { \ 80 - printk(KERN_ERR "CONN @%s : " fmt, \ 81 - __func__, ##args); \ 80 + pr_err("CONN @%s : " fmt, \ 81 + __func__, ##__VA_ARGS__); \ 82 82 } \ 83 83 } \ 84 84 } while (0)
+3 -3
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
··· 15 15 */ 16 16 17 17 #define __UNDEF_NO_VERSION__ 18 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 18 19 19 20 #include <linux/etherdevice.h> 20 21 #include <linux/sched.h> ··· 1122 1121 1123 1122 wl = brcms_attach(pdev); 1124 1123 if (!wl) { 1125 - pr_err("%s: %s: brcms_attach failed!\n", KBUILD_MODNAME, 1126 - __func__); 1124 + pr_err("%s: brcms_attach failed!\n", __func__); 1127 1125 return -ENODEV; 1128 1126 } 1129 1127 return 0; ··· 1183 1183 #endif /* DEBUG */ 1184 1184 1185 1185 error = bcma_driver_register(&brcms_bcma_driver); 1186 - printk(KERN_ERR "%s: register returned %d\n", __func__, error); 1186 + pr_err("%s: register returned %d\n", __func__, error); 1187 1187 if (!error) 1188 1188 return 0; 1189 1189
+4 -2
drivers/net/wireless/brcm80211/brcmsmac/main.c
··· 14 14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 15 */ 16 16 17 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 18 + 17 19 #include <linux/pci_ids.h> 18 20 #include <linux/if_ether.h> 19 21 #include <net/mac80211.h> ··· 5809 5807 bool brcms_c_chipmatch(u16 vendor, u16 device) 5810 5808 { 5811 5809 if (vendor != PCI_VENDOR_ID_BROADCOM) { 5812 - pr_err("chipmatch: unknown vendor id %04x\n", vendor); 5810 + pr_err("unknown vendor id %04x\n", vendor); 5813 5811 return false; 5814 5812 } 5815 5813 ··· 5822 5820 if ((device == BCM43236_D11N_ID) || (device == BCM43236_D11N2G_ID)) 5823 5821 return true; 5824 5822 5825 - pr_err("chipmatch: unknown device id %04x\n", device); 5823 + pr_err("unknown device id %04x\n", device); 5826 5824 return false; 5827 5825 } 5828 5826
+2
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c
··· 14 14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 15 */ 16 16 17 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 18 + 17 19 #include <linux/kernel.h> 18 20 #include <linux/delay.h> 19 21 #include <linux/cordic.h>
+2
drivers/net/wireless/brcm80211/brcmutil/utils.c
··· 14 14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 15 */ 16 16 17 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 18 + 17 19 #include <linux/netdevice.h> 18 20 #include <linux/module.h> 19 21