forked from Minki/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>
This commit is contained in:
parent
c2e6d5abab
commit
02f77195db
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user