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

via-velocity: Use more typical logging styles

Use netdev_<level> in place of VELOCITY_PRT.
Use pr_<level> in place of printk(KERN_<LEVEL>.

Miscellanea:

o Add pr_fmt to prefix pr_<level> output with "via-velocity: "
o Remove now unused functions and macros
o Realign some logging lines
o Remove devname where pr_<level> is also used
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a79da695
This diff is collapsed.
......@@ -1286,50 +1286,6 @@ struct velocity_context {
velocity_mii_read((p),MII_PHYSID1,((u16 *) &id)+1);\
(id);})
/*
* Inline debug routine
*/
enum velocity_msg_level {
MSG_LEVEL_ERR = 0, //Errors that will cause abnormal operation.
MSG_LEVEL_NOTICE = 1, //Some errors need users to be notified.
MSG_LEVEL_INFO = 2, //Normal message.
MSG_LEVEL_VERBOSE = 3, //Will report all trival errors.
MSG_LEVEL_DEBUG = 4 //Only for debug purpose.
};
#ifdef VELOCITY_DEBUG
#define ASSERT(x) { \
if (!(x)) { \
printk(KERN_ERR "assertion %s failed: file %s line %d\n", #x,\
__func__, __LINE__);\
BUG(); \
}\
}
#define VELOCITY_DBG(p,args...) printk(p, ##args)
#else
#define ASSERT(x)
#define VELOCITY_DBG(x)
#endif
#define VELOCITY_PRT(l, p, args...) do {if (l<=msglevel) printk( p ,##args);} while (0)
#define VELOCITY_PRT_CAMMASK(p,t) {\
int i;\
if ((t)==VELOCITY_MULTICAST_CAM) {\
for (i=0;i<(MCAM_SIZE/8);i++)\
printk("%02X",(p)->mCAMmask[i]);\
}\
else {\
for (i=0;i<(VCAM_SIZE/8);i++)\
printk("%02X",(p)->vCAMmask[i]);\
}\
printk("\n");\
}
#define VELOCITY_WOL_MAGIC 0x00000000UL
#define VELOCITY_WOL_PHY 0x00000001UL
#define VELOCITY_WOL_ARP 0x00000002UL
......
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