brcm80211: Use pr_fmt and pr_<level>
authorJoe Perches <joe@perches.com>
Sun, 15 Jan 2012 08:38:44 +0000 (00:38 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 24 Jan 2012 19:21:14 +0000 (14:21 -0500)
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>
13 files changed:
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
drivers/net/wireless/brcm80211/brcmsmac/main.c
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c
drivers/net/wireless/brcm80211/brcmutil/utils.c

index 4bc8d251acf8ed79d446b0dce22c938ca9bcb709..e925290b432bc104057be312664e322a18a66ac6 100644 (file)
@@ -15,6 +15,8 @@
  */
 /* ****************** SDIO CARD Interface Functions **************************/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/types.h>
 #include <linux/netdevice.h>
 #include <linux/export.h>
index 9b8c0ed833d40f523ffbb9ea9f3388ad610daa71..ac71adeece51aa0f4bcb343de17e2abfbd130bde 100644 (file)
@@ -13,6 +13,9 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/types.h>
 #include <linux/netdevice.h>
 #include <linux/mmc/sdio.h>
index ac8d1f4378886c53d2678c5ab763a9bfd6b87951..b3e3b7f25d82332226be904263de4b7109b84823 100644 (file)
@@ -19,6 +19,8 @@
  * 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/netdevice.h>
 #include <linux/sched.h>
index 1c75ea887ac3176de0a73dc07562f948663937da..4187435220f34fbbb5b33fb9d266ffaff121c713 100644 (file)
@@ -13,6 +13,9 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/sched.h>
index 16fd1ab35408efaee54933cdd9bd02208e7c04c2..db2df1f1e6b27589befa5c810acd8d0b223fe75b 100644 (file)
@@ -14,6 +14,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/kthread.h>
index 91ec0235047abb53292041224c432cbe832028cf..6e4b5e85a099d252891acefc0650fa2429ef9238 100644 (file)
@@ -14,6 +14,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/types.h>
 #include <linux/kernel.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, "brcmf_watchdog");
        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;
        }
        /* 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, "brcmf_dpc");
        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;
        }
 
index 11b2d7c97ba22072e8231fd02f2758e7d0bf5945..1534efc21631482e5b7902e88511b48964a15568 100644 (file)
@@ -15,6 +15,8 @@
  */
 /* ***** SDIO interface chip backplane handle functions ***** */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/types.h>
 #include <linux/netdevice.h>
 #include <linux/mmc/card.h>
index bf11850a20f11b1201179c7c7659a16397f2d4cc..886b0ccbc5c32420881721b20b177658afae52ab 100644 (file)
@@ -16,6 +16,8 @@
 
 /* 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/if_arp.h>
 #include <linux/sched.h>
index 69a48729a728a764dabb92e114282bc014dbfefc..b5d9b36df3d0556bb54a34efbeabc5512b10057b 100644 (file)
@@ -32,53 +32,53 @@ struct brcmf_cfg80211_ibss;
 #define WL_DBG_MASK            ((WL_DBG_INFO | WL_DBG_ERR | WL_DBG_TRACE) | \
                                (WL_DBG_SCAN) | (WL_DBG_CONN))
 
-#define        WL_ERR(fmt, args...)                                    \
+#define        WL_ERR(fmt, ...)                                        \
 do {                                                           \
        if (brcmf_dbg_level & WL_DBG_ERR) {                     \
                if (net_ratelimit()) {                          \
-                       printk(KERN_ERR "ERROR @%s : " fmt,     \
-                               __func__, ##args);              \
+                       pr_err("ERROR @%s : " fmt,              \
+                              __func__, ##__VA_ARGS__);        \
                }                                               \
        }                                                       \
 } while (0)
 
 #if (defined DEBUG)
-#define        WL_INFO(fmt, args...)                                   \
+#define        WL_INFO(fmt, ...)                                       \
 do {                                                           \
        if (brcmf_dbg_level & WL_DBG_INFO) {                    \
                if (net_ratelimit()) {                          \
-                       printk(KERN_ERR "INFO @%s : " fmt,      \
-                               __func__, ##args);              \
+                       pr_err("INFO @%s : " fmt,               \
+                              __func__, ##__VA_ARGS__);        \
                }                                               \
        }                                                       \
 } while (0)
 
-#define        WL_TRACE(fmt, args...)                                  \
+#define        WL_TRACE(fmt, ...)                                      \
 do {                                                           \
        if (brcmf_dbg_level & WL_DBG_TRACE) {                   \
                if (net_ratelimit()) {                          \
-                       printk(KERN_ERR "TRACE @%s : " fmt,     \
-                               __func__, ##args);              \
+                       pr_err("TRACE @%s : " fmt,              \
+                              __func__, ##__VA_ARGS__);        \
                }                                               \
        }                                                       \
 } while (0)
 
-#define        WL_SCAN(fmt, args...)                                   \
+#define        WL_SCAN(fmt, ...)                                       \
 do {                                                           \
        if (brcmf_dbg_level & WL_DBG_SCAN) {                    \
                if (net_ratelimit()) {                          \
-                       printk(KERN_ERR "SCAN @%s : " fmt,      \
-                               __func__, ##args);              \
+                       pr_err("SCAN @%s : " fmt,               \
+                              __func__, ##__VA_ARGS__);        \
                }                                               \
        }                                                       \
 } while (0)
 
-#define        WL_CONN(fmt, args...)                                   \
+#define        WL_CONN(fmt, ...)                                       \
 do {                                                           \
        if (brcmf_dbg_level & WL_DBG_CONN) {                    \
                if (net_ratelimit()) {                          \
-                       printk(KERN_ERR "CONN @%s : " fmt,      \
-                               __func__, ##args);              \
+                       pr_err("CONN @%s : " fmt,               \
+                              __func__, ##__VA_ARGS__);        \
                }                                               \
        }                                                       \
 } while (0)
index 04ba9a878f40c33c78433861e02589518754b12d..c8427978d09e503adb58264d2b6e5e2d1d9ef143 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 #define __UNDEF_NO_VERSION__
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/etherdevice.h>
 #include <linux/sched.h>
@@ -1121,8 +1122,7 @@ static int __devinit brcms_bcma_probe(struct bcma_device *pdev)
 
        wl = brcms_attach(pdev);
        if (!wl) {
-               pr_err("%s: %s: brcms_attach failed!\n", KBUILD_MODNAME,
-                      __func__);
+               pr_err("%s: brcms_attach failed!\n", __func__);
                return -ENODEV;
        }
        return 0;
@@ -1183,7 +1183,7 @@ static int __init brcms_module_init(void)
 #endif                         /* DEBUG */
 
        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)
                return 0;
 
index 72701a4bf89d00bf8d58fbe05c2cd4ec0c59f61c..976a53183f685d90b565604de166adc0346b2503 100644 (file)
@@ -14,6 +14,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/pci_ids.h>
 #include <linux/if_ether.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)
 {
        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;
        }
 
@@ -5820,7 +5822,7 @@ bool brcms_c_chipmatch(u16 vendor, u16 device)
        if ((device == BCM43236_D11N_ID) || (device == BCM43236_D11N2G_ID))
                return true;
 
-       pr_err("chipmatch: unknown device id %04x\n", device);
+       pr_err("unknown device id %04x\n", device);
        return false;
 }
 
index a0909be6ef370c2ff8841ac20bd6b0aa20d39012..ec7450d2fbd6230d11181aceb0c582c7fd5c9cb0 100644 (file)
@@ -14,6 +14,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/cordic.h>
index 49086606485b20ecd2e1896d5425efc90d9ce81e..b45ab34cdfdc0693676fae614359b2bafaa5c526 100644 (file)
@@ -14,6 +14,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/netdevice.h>
 #include <linux/module.h>