aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smsc911x.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-03-25 10:21:22 -0400
committerDavid S. Miller <davem@davemloft.net>2011-03-31 00:39:22 -0400
commitdffc6b2432ea89af24a36e8100b3eeea09db67e5 (patch)
tree26220b0d647ca01af227397419732e2e7eb337e5 /drivers/net/smsc911x.h
parente8c37c80006c99a00aa70a783023d616c166a04b (diff)
smsc911x: Use pr_fmt, netdev_<level>, and netif_<level>
Use the more common/verbose logging styles. Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt Remove smsc911x prefixes from format strings. Rename SMSC_WARNING to SMSC_WARN. Remove DPRINTK macro. Use netif_<level> in SMSC_<level> macros. Convert NETIF_MSG_<foo> uses to lower case. Add no_printk verification in non-debug uses. Add pdata to SMSC_<level> uses to avoid hidden variable uses. Convert printks to netdev_<level> as appropriate. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/smsc911x.h')
-rw-r--r--drivers/net/smsc911x.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/net/smsc911x.h b/drivers/net/smsc911x.h
index 50f712e99e96..8d67aacf8867 100644
--- a/drivers/net/smsc911x.h
+++ b/drivers/net/smsc911x.h
@@ -33,25 +33,21 @@
33 * can be successfully looped back */ 33 * can be successfully looped back */
34#define USE_PHY_WORK_AROUND 34#define USE_PHY_WORK_AROUND
35 35
36#define DPRINTK(nlevel, klevel, fmt, args...) \
37 ((void)((NETIF_MSG_##nlevel & pdata->msg_enable) && \
38 printk(KERN_##klevel "%s: %s: " fmt "\n", \
39 pdata->dev->name, __func__, ## args)))
40
41#if USE_DEBUG >= 1 36#if USE_DEBUG >= 1
42#define SMSC_WARNING(nlevel, fmt, args...) \ 37#define SMSC_WARN(pdata, nlevel, fmt, args...) \
43 DPRINTK(nlevel, WARNING, fmt, ## args) 38 netif_warn(pdata, nlevel, (pdata)->dev, \
39 "%s: " fmt "\n", __func__, ##args)
44#else 40#else
45#define SMSC_WARNING(nlevel, fmt, args...) \ 41#define SMSC_WARN(pdata, nlevel, fmt, args...) \
46 ({ do {} while (0); 0; }) 42 no_printk(fmt "\n", ##args)
47#endif 43#endif
48 44
49#if USE_DEBUG >= 2 45#if USE_DEBUG >= 2
50#define SMSC_TRACE(nlevel, fmt, args...) \ 46#define SMSC_TRACE(pdata, nlevel, fmt, args...) \
51 DPRINTK(nlevel, INFO, fmt, ## args) 47 netif_info(pdata, nlevel, pdata->dev, fmt "\n", ##args)
52#else 48#else
53#define SMSC_TRACE(nlevel, fmt, args...) \ 49#define SMSC_TRACE(pdata, nlevel, fmt, args...) \
54 ({ do {} while (0); 0; }) 50 no_printk(fmt "\n", ##args)
55#endif 51#endif
56 52
57#ifdef CONFIG_DEBUG_SPINLOCK 53#ifdef CONFIG_DEBUG_SPINLOCK