Browse Source

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>
Joe Perches 13 years ago
parent
commit
02f77195db

+ 2 - 0
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c

@@ -15,6 +15,8 @@
  */
  */
 /* ****************** SDIO CARD Interface Functions **************************/
 /* ****************** SDIO CARD Interface Functions **************************/
 
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/types.h>
 #include <linux/types.h>
 #include <linux/netdevice.h>
 #include <linux/netdevice.h>
 #include <linux/export.h>
 #include <linux/export.h>

+ 3 - 0
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c

@@ -13,6 +13,9 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/types.h>
 #include <linux/types.h>
 #include <linux/netdevice.h>
 #include <linux/netdevice.h>
 #include <linux/mmc/sdio.h>
 #include <linux/mmc/sdio.h>

+ 2 - 0
drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c

@@ -19,6 +19,8 @@
  * For certain dcmd codes, the dongle interprets string data from the host.
  * For certain dcmd codes, the dongle interprets string data from the host.
  ******************************************************************************/
  ******************************************************************************/
 
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/types.h>
 #include <linux/types.h>
 #include <linux/netdevice.h>
 #include <linux/netdevice.h>
 #include <linux/sched.h>
 #include <linux/sched.h>

+ 3 - 0
drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c

@@ -13,6 +13,9 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/string.h>
 #include <linux/sched.h>
 #include <linux/sched.h>

+ 2 - 0
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c

@@ -14,6 +14,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
  */
 
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/init.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/kernel.h>
 #include <linux/kthread.h>
 #include <linux/kthread.h>

+ 4 - 4
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c

@@ -14,6 +14,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
  */
 
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/types.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/kernel.h>
 #include <linux/kthread.h>
 #include <linux/kthread.h>
@@ -3896,8 +3898,7 @@ void *brcmf_sdbrcm_probe(u32 regsva, struct brcmf_sdio_dev *sdiodev)
 	bus->watchdog_tsk = kthread_run(brcmf_sdbrcm_watchdog_thread,
 	bus->watchdog_tsk = kthread_run(brcmf_sdbrcm_watchdog_thread,
 					bus, "brcmf_watchdog");
 					bus, "brcmf_watchdog");
 	if (IS_ERR(bus->watchdog_tsk)) {
 	if (IS_ERR(bus->watchdog_tsk)) {
-		printk(KERN_WARNING
-		       "brcmf_watchdog thread failed to start\n");
+		pr_warn("brcmf_watchdog thread failed to start\n");
 		bus->watchdog_tsk = NULL;
 		bus->watchdog_tsk = NULL;
 	}
 	}
 	/* Initialize DPC thread */
 	/* Initialize DPC thread */
@@ -3905,8 +3906,7 @@ void *brcmf_sdbrcm_probe(u32 regsva, struct brcmf_sdio_dev *sdiodev)
 	bus->dpc_tsk = kthread_run(brcmf_sdbrcm_dpc_thread,
 	bus->dpc_tsk = kthread_run(brcmf_sdbrcm_dpc_thread,
 				   bus, "brcmf_dpc");
 				   bus, "brcmf_dpc");
 	if (IS_ERR(bus->dpc_tsk)) {
 	if (IS_ERR(bus->dpc_tsk)) {
-		printk(KERN_WARNING
-		       "brcmf_dpc thread failed to start\n");
+		pr_warn("brcmf_dpc thread failed to start\n");
 		bus->dpc_tsk = NULL;
 		bus->dpc_tsk = NULL;
 	}
 	}
 
 

+ 2 - 0
drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c

@@ -15,6 +15,8 @@
  */
  */
 /* ***** SDIO interface chip backplane handle functions ***** */
 /* ***** SDIO interface chip backplane handle functions ***** */
 
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/types.h>
 #include <linux/types.h>
 #include <linux/netdevice.h>
 #include <linux/netdevice.h>
 #include <linux/mmc/card.h>
 #include <linux/mmc/card.h>

+ 2 - 0
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c

@@ -16,6 +16,8 @@
 
 
 /* Toplevel file. Relies on dhd_linux.c to send commands to the dongle. */
 /* Toplevel file. Relies on dhd_linux.c to send commands to the dongle. */
 
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/kernel.h>
 #include <linux/if_arp.h>
 #include <linux/if_arp.h>
 #include <linux/sched.h>
 #include <linux/sched.h>

+ 15 - 15
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h

@@ -32,53 +32,53 @@ struct brcmf_cfg80211_ibss;
 #define WL_DBG_MASK		((WL_DBG_INFO | WL_DBG_ERR | WL_DBG_TRACE) | \
 #define WL_DBG_MASK		((WL_DBG_INFO | WL_DBG_ERR | WL_DBG_TRACE) | \
 				(WL_DBG_SCAN) | (WL_DBG_CONN))
 				(WL_DBG_SCAN) | (WL_DBG_CONN))
 
 
-#define	WL_ERR(fmt, args...)					\
+#define	WL_ERR(fmt, ...)					\
 do {								\
 do {								\
 	if (brcmf_dbg_level & WL_DBG_ERR) {			\
 	if (brcmf_dbg_level & WL_DBG_ERR) {			\
 		if (net_ratelimit()) {				\
 		if (net_ratelimit()) {				\
-			printk(KERN_ERR "ERROR @%s : " fmt,	\
-				__func__, ##args);		\
+			pr_err("ERROR @%s : " fmt,		\
+			       __func__, ##__VA_ARGS__);	\
 		}						\
 		}						\
 	}							\
 	}							\
 } while (0)
 } while (0)
 
 
 #if (defined DEBUG)
 #if (defined DEBUG)
-#define	WL_INFO(fmt, args...)					\
+#define	WL_INFO(fmt, ...)					\
 do {								\
 do {								\
 	if (brcmf_dbg_level & WL_DBG_INFO) {			\
 	if (brcmf_dbg_level & WL_DBG_INFO) {			\
 		if (net_ratelimit()) {				\
 		if (net_ratelimit()) {				\
-			printk(KERN_ERR "INFO @%s : " fmt,	\
-				__func__, ##args);		\
+			pr_err("INFO @%s : " fmt,		\
+			       __func__, ##__VA_ARGS__);	\
 		}						\
 		}						\
 	}							\
 	}							\
 } while (0)
 } while (0)
 
 
-#define	WL_TRACE(fmt, args...)					\
+#define	WL_TRACE(fmt, ...)					\
 do {								\
 do {								\
 	if (brcmf_dbg_level & WL_DBG_TRACE) {			\
 	if (brcmf_dbg_level & WL_DBG_TRACE) {			\
 		if (net_ratelimit()) {				\
 		if (net_ratelimit()) {				\
-			printk(KERN_ERR "TRACE @%s : " fmt,	\
-				__func__, ##args);		\
+			pr_err("TRACE @%s : " fmt,		\
+			       __func__, ##__VA_ARGS__);	\
 		}						\
 		}						\
 	}							\
 	}							\
 } while (0)
 } while (0)
 
 
-#define	WL_SCAN(fmt, args...)					\
+#define	WL_SCAN(fmt, ...)					\
 do {								\
 do {								\
 	if (brcmf_dbg_level & WL_DBG_SCAN) {			\
 	if (brcmf_dbg_level & WL_DBG_SCAN) {			\
 		if (net_ratelimit()) {				\
 		if (net_ratelimit()) {				\
-			printk(KERN_ERR "SCAN @%s : " fmt,	\
-				__func__, ##args);		\
+			pr_err("SCAN @%s : " fmt,		\
+			       __func__, ##__VA_ARGS__);	\
 		}						\
 		}						\
 	}							\
 	}							\
 } while (0)
 } while (0)
 
 
-#define	WL_CONN(fmt, args...)					\
+#define	WL_CONN(fmt, ...)					\
 do {								\
 do {								\
 	if (brcmf_dbg_level & WL_DBG_CONN) {			\
 	if (brcmf_dbg_level & WL_DBG_CONN) {			\
 		if (net_ratelimit()) {				\
 		if (net_ratelimit()) {				\
-			printk(KERN_ERR "CONN @%s : " fmt,	\
-				__func__, ##args);		\
+			pr_err("CONN @%s : " fmt,		\
+			       __func__, ##__VA_ARGS__);	\
 		}						\
 		}						\
 	}							\
 	}							\
 } while (0)
 } while (0)

+ 3 - 3
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c

@@ -15,6 +15,7 @@
  */
  */
 
 
 #define __UNDEF_NO_VERSION__
 #define __UNDEF_NO_VERSION__
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 
 #include <linux/etherdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/sched.h>
 #include <linux/sched.h>
@@ -1121,8 +1122,7 @@ static int __devinit brcms_bcma_probe(struct bcma_device *pdev)
 
 
 	wl = brcms_attach(pdev);
 	wl = brcms_attach(pdev);
 	if (!wl) {
 	if (!wl) {
-		pr_err("%s: %s: brcms_attach failed!\n", KBUILD_MODNAME,
-		       __func__);
+		pr_err("%s: brcms_attach failed!\n", __func__);
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}
 	return 0;
 	return 0;
@@ -1183,7 +1183,7 @@ static int __init brcms_module_init(void)
 #endif				/* DEBUG */
 #endif				/* DEBUG */
 
 
 	error = bcma_driver_register(&brcms_bcma_driver);
 	error = bcma_driver_register(&brcms_bcma_driver);
-	printk(KERN_ERR "%s: register returned %d\n", __func__, error);
+	pr_err("%s: register returned %d\n", __func__, error);
 	if (!error)
 	if (!error)
 		return 0;
 		return 0;
 
 

+ 4 - 2
drivers/net/wireless/brcm80211/brcmsmac/main.c

@@ -14,6 +14,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
  */
 
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/pci_ids.h>
 #include <linux/pci_ids.h>
 #include <linux/if_ether.h>
 #include <linux/if_ether.h>
 #include <net/mac80211.h>
 #include <net/mac80211.h>
@@ -5807,7 +5809,7 @@ void brcms_c_print_txstatus(struct tx_status *txs)
 bool brcms_c_chipmatch(u16 vendor, u16 device)
 bool brcms_c_chipmatch(u16 vendor, u16 device)
 {
 {
 	if (vendor != PCI_VENDOR_ID_BROADCOM) {
 	if (vendor != PCI_VENDOR_ID_BROADCOM) {
-		pr_err("chipmatch: unknown vendor id %04x\n", vendor);
+		pr_err("unknown vendor id %04x\n", vendor);
 		return false;
 		return false;
 	}
 	}
 
 
@@ -5820,7 +5822,7 @@ bool brcms_c_chipmatch(u16 vendor, u16 device)
 	if ((device == BCM43236_D11N_ID) || (device == BCM43236_D11N2G_ID))
 	if ((device == BCM43236_D11N_ID) || (device == BCM43236_D11N2G_ID))
 		return true;
 		return true;
 
 
-	pr_err("chipmatch: unknown device id %04x\n", device);
+	pr_err("unknown device id %04x\n", device);
 	return false;
 	return false;
 }
 }
 
 

+ 2 - 0
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c

@@ -14,6 +14,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
  */
 
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/delay.h>
 #include <linux/cordic.h>
 #include <linux/cordic.h>

+ 2 - 0
drivers/net/wireless/brcm80211/brcmutil/utils.c

@@ -14,6 +14,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
  */
 
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/netdevice.h>
 #include <linux/netdevice.h>
 #include <linux/module.h>
 #include <linux/module.h>