diff options
author | Joe Perches <joe@perches.com> | 2012-01-15 03:38:44 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-24 14:21:14 -0500 |
commit | 02f77195db6ce252d5488b6d48d8edc1c5e2aa30 (patch) | |
tree | c04932d7ec86a3558a58bb24b4e5481607545990 /drivers/net/wireless/brcm80211/brcmfmac | |
parent | c2e6d5abab73df316d2ae7caa6d902c143b2d52d (diff) |
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>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac')
9 files changed, 35 insertions, 19 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c index 4bc8d251acf8..e925290b432b 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | |||
@@ -15,6 +15,8 @@ | |||
15 | */ | 15 | */ |
16 | /* ****************** SDIO CARD Interface Functions **************************/ | 16 | /* ****************** SDIO CARD Interface Functions **************************/ |
17 | 17 | ||
18 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
19 | |||
18 | #include <linux/types.h> | 20 | #include <linux/types.h> |
19 | #include <linux/netdevice.h> | 21 | #include <linux/netdevice.h> |
20 | #include <linux/export.h> | 22 | #include <linux/export.h> |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c index 9b8c0ed833d4..ac71adeece51 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | |||
@@ -13,6 +13,9 @@ | |||
13 | * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | 13 | * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | */ | 15 | */ |
16 | |||
17 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
18 | |||
16 | #include <linux/types.h> | 19 | #include <linux/types.h> |
17 | #include <linux/netdevice.h> | 20 | #include <linux/netdevice.h> |
18 | #include <linux/mmc/sdio.h> | 21 | #include <linux/mmc/sdio.h> |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c index ac8d1f437888..b3e3b7f25d82 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c | |||
@@ -19,6 +19,8 @@ | |||
19 | * For certain dcmd codes, the dongle interprets string data from the host. | 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 | #include <linux/types.h> | 24 | #include <linux/types.h> |
23 | #include <linux/netdevice.h> | 25 | #include <linux/netdevice.h> |
24 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c index 1c75ea887ac3..4187435220f3 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c | |||
@@ -13,6 +13,9 @@ | |||
13 | * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | 13 | * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | */ | 15 | */ |
16 | |||
17 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
18 | |||
16 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
17 | #include <linux/string.h> | 20 | #include <linux/string.h> |
18 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c index 16fd1ab35408..db2df1f1e6b2 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | |||
@@ -14,6 +14,8 @@ | |||
14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
18 | |||
17 | #include <linux/init.h> | 19 | #include <linux/init.h> |
18 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
19 | #include <linux/kthread.h> | 21 | #include <linux/kthread.h> |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c index 91ec0235047a..6e4b5e85a099 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | |||
@@ -14,6 +14,8 @@ | |||
14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
18 | |||
17 | #include <linux/types.h> | 19 | #include <linux/types.h> |
18 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
19 | #include <linux/kthread.h> | 21 | #include <linux/kthread.h> |
@@ -3896,8 +3898,7 @@ void *brcmf_sdbrcm_probe(u32 regsva, struct brcmf_sdio_dev *sdiodev) | |||
3896 | bus->watchdog_tsk = kthread_run(brcmf_sdbrcm_watchdog_thread, | 3898 | bus->watchdog_tsk = kthread_run(brcmf_sdbrcm_watchdog_thread, |
3897 | bus, "brcmf_watchdog"); | 3899 | bus, "brcmf_watchdog"); |
3898 | if (IS_ERR(bus->watchdog_tsk)) { | 3900 | if (IS_ERR(bus->watchdog_tsk)) { |
3899 | printk(KERN_WARNING | 3901 | pr_warn("brcmf_watchdog thread failed to start\n"); |
3900 | "brcmf_watchdog thread failed to start\n"); | ||
3901 | bus->watchdog_tsk = NULL; | 3902 | bus->watchdog_tsk = NULL; |
3902 | } | 3903 | } |
3903 | /* Initialize DPC thread */ | 3904 | /* Initialize DPC thread */ |
@@ -3905,8 +3906,7 @@ void *brcmf_sdbrcm_probe(u32 regsva, struct brcmf_sdio_dev *sdiodev) | |||
3905 | bus->dpc_tsk = kthread_run(brcmf_sdbrcm_dpc_thread, | 3906 | bus->dpc_tsk = kthread_run(brcmf_sdbrcm_dpc_thread, |
3906 | bus, "brcmf_dpc"); | 3907 | bus, "brcmf_dpc"); |
3907 | if (IS_ERR(bus->dpc_tsk)) { | 3908 | if (IS_ERR(bus->dpc_tsk)) { |
3908 | printk(KERN_WARNING | 3909 | pr_warn("brcmf_dpc thread failed to start\n"); |
3909 | "brcmf_dpc thread failed to start\n"); | ||
3910 | bus->dpc_tsk = NULL; | 3910 | bus->dpc_tsk = NULL; |
3911 | } | 3911 | } |
3912 | 3912 | ||
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c index 11b2d7c97ba2..1534efc21631 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c | |||
@@ -15,6 +15,8 @@ | |||
15 | */ | 15 | */ |
16 | /* ***** SDIO interface chip backplane handle functions ***** */ | 16 | /* ***** SDIO interface chip backplane handle functions ***** */ |
17 | 17 | ||
18 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
19 | |||
18 | #include <linux/types.h> | 20 | #include <linux/types.h> |
19 | #include <linux/netdevice.h> | 21 | #include <linux/netdevice.h> |
20 | #include <linux/mmc/card.h> | 22 | #include <linux/mmc/card.h> |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index bf11850a20f1..886b0ccbc5c3 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | |||
@@ -16,6 +16,8 @@ | |||
16 | 16 | ||
17 | /* Toplevel file. Relies on dhd_linux.c to send commands to the dongle. */ | 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 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
20 | #include <linux/if_arp.h> | 22 | #include <linux/if_arp.h> |
21 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h index 69a48729a728..b5d9b36df3d0 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h | |||
@@ -32,53 +32,53 @@ struct brcmf_cfg80211_ibss; | |||
32 | #define WL_DBG_MASK ((WL_DBG_INFO | WL_DBG_ERR | WL_DBG_TRACE) | \ | 32 | #define WL_DBG_MASK ((WL_DBG_INFO | WL_DBG_ERR | WL_DBG_TRACE) | \ |
33 | (WL_DBG_SCAN) | (WL_DBG_CONN)) | 33 | (WL_DBG_SCAN) | (WL_DBG_CONN)) |
34 | 34 | ||
35 | #define WL_ERR(fmt, args...) \ | 35 | #define WL_ERR(fmt, ...) \ |
36 | do { \ | 36 | do { \ |
37 | if (brcmf_dbg_level & WL_DBG_ERR) { \ | 37 | if (brcmf_dbg_level & WL_DBG_ERR) { \ |
38 | if (net_ratelimit()) { \ | 38 | if (net_ratelimit()) { \ |
39 | printk(KERN_ERR "ERROR @%s : " fmt, \ | 39 | pr_err("ERROR @%s : " fmt, \ |
40 | __func__, ##args); \ | 40 | __func__, ##__VA_ARGS__); \ |
41 | } \ | 41 | } \ |
42 | } \ | 42 | } \ |
43 | } while (0) | 43 | } while (0) |
44 | 44 | ||
45 | #if (defined DEBUG) | 45 | #if (defined DEBUG) |
46 | #define WL_INFO(fmt, args...) \ | 46 | #define WL_INFO(fmt, ...) \ |
47 | do { \ | 47 | do { \ |
48 | if (brcmf_dbg_level & WL_DBG_INFO) { \ | 48 | if (brcmf_dbg_level & WL_DBG_INFO) { \ |
49 | if (net_ratelimit()) { \ | 49 | if (net_ratelimit()) { \ |
50 | printk(KERN_ERR "INFO @%s : " fmt, \ | 50 | pr_err("INFO @%s : " fmt, \ |
51 | __func__, ##args); \ | 51 | __func__, ##__VA_ARGS__); \ |
52 | } \ | 52 | } \ |
53 | } \ | 53 | } \ |
54 | } while (0) | 54 | } while (0) |
55 | 55 | ||
56 | #define WL_TRACE(fmt, args...) \ | 56 | #define WL_TRACE(fmt, ...) \ |
57 | do { \ | 57 | do { \ |
58 | if (brcmf_dbg_level & WL_DBG_TRACE) { \ | 58 | if (brcmf_dbg_level & WL_DBG_TRACE) { \ |
59 | if (net_ratelimit()) { \ | 59 | if (net_ratelimit()) { \ |
60 | printk(KERN_ERR "TRACE @%s : " fmt, \ | 60 | pr_err("TRACE @%s : " fmt, \ |
61 | __func__, ##args); \ | 61 | __func__, ##__VA_ARGS__); \ |
62 | } \ | 62 | } \ |
63 | } \ | 63 | } \ |
64 | } while (0) | 64 | } while (0) |
65 | 65 | ||
66 | #define WL_SCAN(fmt, args...) \ | 66 | #define WL_SCAN(fmt, ...) \ |
67 | do { \ | 67 | do { \ |
68 | if (brcmf_dbg_level & WL_DBG_SCAN) { \ | 68 | if (brcmf_dbg_level & WL_DBG_SCAN) { \ |
69 | if (net_ratelimit()) { \ | 69 | if (net_ratelimit()) { \ |
70 | printk(KERN_ERR "SCAN @%s : " fmt, \ | 70 | pr_err("SCAN @%s : " fmt, \ |
71 | __func__, ##args); \ | 71 | __func__, ##__VA_ARGS__); \ |
72 | } \ | 72 | } \ |
73 | } \ | 73 | } \ |
74 | } while (0) | 74 | } while (0) |
75 | 75 | ||
76 | #define WL_CONN(fmt, args...) \ | 76 | #define WL_CONN(fmt, ...) \ |
77 | do { \ | 77 | do { \ |
78 | if (brcmf_dbg_level & WL_DBG_CONN) { \ | 78 | if (brcmf_dbg_level & WL_DBG_CONN) { \ |
79 | if (net_ratelimit()) { \ | 79 | if (net_ratelimit()) { \ |
80 | printk(KERN_ERR "CONN @%s : " fmt, \ | 80 | pr_err("CONN @%s : " fmt, \ |
81 | __func__, ##args); \ | 81 | __func__, ##__VA_ARGS__); \ |
82 | } \ | 82 | } \ |
83 | } \ | 83 | } \ |
84 | } while (0) | 84 | } while (0) |