aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/chelsio/common.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-02-22 11:56:57 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-26 04:38:34 -0500
commitc1f51212eb809849bdc68a856ae5f424dcf20d9b (patch)
tree2a01f9e5201d3fc40527c24961b0f888f9e0ed61 /drivers/net/chelsio/common.h
parent003bdb279bb6b212f25ea4e60e0164b6109d3704 (diff)
drivers/net/chelsio: Use pr_<level>, netif_msg_<type>
Convert CH_<level> and CH_DBG uses to pr_<level> and netif equivalents Remove CH_<level> and CH_DBG macro definitions Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/chelsio/common.h')
-rw-r--r--drivers/net/chelsio/common.h24
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/net/chelsio/common.h b/drivers/net/chelsio/common.h
index 9f89fd600643..2d11afe45310 100644
--- a/drivers/net/chelsio/common.h
+++ b/drivers/net/chelsio/common.h
@@ -36,6 +36,8 @@
36 * * 36 * *
37 ****************************************************************************/ 37 ****************************************************************************/
38 38
39#define pr_fmt(fmt) "cxgb: " fmt
40
39#ifndef _CXGB_COMMON_H_ 41#ifndef _CXGB_COMMON_H_
40#define _CXGB_COMMON_H_ 42#define _CXGB_COMMON_H_
41 43
@@ -55,28 +57,6 @@
55#define DRV_DESCRIPTION "Chelsio 10Gb Ethernet Driver" 57#define DRV_DESCRIPTION "Chelsio 10Gb Ethernet Driver"
56#define DRV_NAME "cxgb" 58#define DRV_NAME "cxgb"
57#define DRV_VERSION "2.2" 59#define DRV_VERSION "2.2"
58#define PFX DRV_NAME ": "
59
60#define CH_ERR(fmt, ...) printk(KERN_ERR PFX fmt, ## __VA_ARGS__)
61#define CH_WARN(fmt, ...) printk(KERN_WARNING PFX fmt, ## __VA_ARGS__)
62#define CH_ALERT(fmt, ...) printk(KERN_ALERT PFX fmt, ## __VA_ARGS__)
63
64/*
65 * More powerful macro that selectively prints messages based on msg_enable.
66 * For info and debugging messages.
67 */
68#define CH_MSG(adapter, level, category, fmt, ...) do { \
69 if ((adapter)->msg_enable & NETIF_MSG_##category) \
70 printk(KERN_##level PFX "%s: " fmt, (adapter)->name, \
71 ## __VA_ARGS__); \
72} while (0)
73
74#ifdef DEBUG
75# define CH_DBG(adapter, category, fmt, ...) \
76 CH_MSG(adapter, DEBUG, category, fmt, ## __VA_ARGS__)
77#else
78# define CH_DBG(fmt, ...)
79#endif
80 60
81#define CH_DEVICE(devid, ssid, idx) \ 61#define CH_DEVICE(devid, ssid, idx) \
82 { PCI_VENDOR_ID_CHELSIO, devid, PCI_ANY_ID, ssid, 0, 0, idx } 62 { PCI_VENDOR_ID_CHELSIO, devid, PCI_ANY_ID, ssid, 0, 0, idx }