Commit dffc6b24 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e8c37c80
This diff is collapsed.
......@@ -33,25 +33,21 @@
* can be successfully looped back */
#define USE_PHY_WORK_AROUND
#define DPRINTK(nlevel, klevel, fmt, args...) \
((void)((NETIF_MSG_##nlevel & pdata->msg_enable) && \
printk(KERN_##klevel "%s: %s: " fmt "\n", \
pdata->dev->name, __func__, ## args)))
#if USE_DEBUG >= 1
#define SMSC_WARNING(nlevel, fmt, args...) \
DPRINTK(nlevel, WARNING, fmt, ## args)
#define SMSC_WARN(pdata, nlevel, fmt, args...) \
netif_warn(pdata, nlevel, (pdata)->dev, \
"%s: " fmt "\n", __func__, ##args)
#else
#define SMSC_WARNING(nlevel, fmt, args...) \
({ do {} while (0); 0; })
#define SMSC_WARN(pdata, nlevel, fmt, args...) \
no_printk(fmt "\n", ##args)
#endif
#if USE_DEBUG >= 2
#define SMSC_TRACE(nlevel, fmt, args...) \
DPRINTK(nlevel, INFO, fmt, ## args)
#define SMSC_TRACE(pdata, nlevel, fmt, args...) \
netif_info(pdata, nlevel, pdata->dev, fmt "\n", ##args)
#else
#define SMSC_TRACE(nlevel, fmt, args...) \
({ do {} while (0); 0; })
#define SMSC_TRACE(pdata, nlevel, fmt, args...) \
no_printk(fmt "\n", ##args)
#endif
#ifdef CONFIG_DEBUG_SPINLOCK
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment