RE: [patch net-next]alx: Atheros AR8131/AR8151/AR8152/AR8161Ethernet driver

From: Ren, Cloud
Date: Wed Oct 19 2011 - 03:44:05 EST


Ok. What logging interfaces can I use? Are they dev_err, dev_info and dev_warn ? thanks



-----Original Message-----
From: David Miller [mailto:davem@xxxxxxxxxxxxx]
Sent: Wednesday, October 19, 2011 3:33 PM
To: Ren, Cloud
Cc: Rodriguez, Luis; netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [patch net-next]alx: Atheros AR8131/AR8151/AR8152/AR8161 Ethernet driver

From: <cloud.ren@xxxxxxxxxxx>
Date: Wed, 19 Oct 2011 15:26:53 +0800

> +#define HW_PRINT(_klv, _fmt, _args...) \
> + if (ALX_HW_MSG_LV_##_klv || ALX_HW_MSG_LV_ALL) {\
> + printk(KERN_##_klv ALX_HW_MSG_PFX_NAME "%s: " _fmt, \
> + __func__, ## _args); \
> + }

Do not create your own network driver debugging facilities and macros for logging messages, we have rich debugging and logging level interfaces that network drivers can use exactly for this purpose.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/