Stephen Hemminger wrote:
On Mon, 11 Jun 2007 14:37:21 -0700
Auke Kok <[EMAIL PROTECTED]> wrote:
A lot of netdevices implement their own variant of printk and use
use variations of dev_printk, printk or others that use msg_enable,
which has been an eyesore with countless variations across driver
On Mon, 2007-06-11 at 15:01 -0700, Kok, Auke wrote:
> > msg_enable is more frequently defined in drivers/net as u32 not int.
> yes, we're only using the bottom 15 bits anyway, but the net_device struct
> consistently uses 'int' style members, leaving it up to the compiler to pick
> an
> appropri
On Mon, 11 Jun 2007 14:37:21 -0700
Auke Kok <[EMAIL PROTECTED]> wrote:
> A lot of netdevices implement their own variant of printk and use
> use variations of dev_printk, printk or others that use msg_enable,
> which has been an eyesore with countless variations across drivers.
>
> This patch imp
Randy Dunlap wrote:
On Mon, 11 Jun 2007 14:37:21 -0700 Auke Kok wrote:
include/linux/netdevice.h | 38 ++
net/core/dev.c|5 +
net/core/ethtool.c| 14 +++---
3 files changed, 50 insertions(+), 7 deletions(-)
diff --git
Joe Perches wrote:
On Mon, 2007-06-11 at 14:37 -0700, Auke Kok wrote:
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 3a70f55..d185f41 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -540,6 +540,8 @@ struct net_device
struct device
On Mon, 11 Jun 2007 14:37:21 -0700 Auke Kok wrote:
> include/linux/netdevice.h | 38 ++
> net/core/dev.c|5 +
> net/core/ethtool.c| 14 +++---
> 3 files changed, 50 insertions(+), 7 deletions(-)
>
> diff --git a/include/
On Mon, 2007-06-11 at 14:37 -0700, Auke Kok wrote:
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 3a70f55..d185f41 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -540,6 +540,8 @@ struct net_device
> struct device dev;
>
Auke Kok wrote:
A lot of netdevices implement their own variant of printk and use
use variations of dev_printk, printk or others that use msg_enable,
which has been an eyesore with countless variations across drivers.
+#define ndev_err(netdev, level, format, arg...) \
+ do { if ((netde
A lot of netdevices implement their own variant of printk and use
use variations of dev_printk, printk or others that use msg_enable,
which has been an eyesore with countless variations across drivers.
This patch implements a standard ndev_printk and derivatives
such as ndev_err, ndev_info, ndev_w
Joe Perches wrote:
I like the ndev_printk idea.
I think a ndev_ printks should take a const netdev*
as the first argument.
Also, better for the non-debug use of ndev_dbg is to have a
static inline function so printf args are verified.
For instance, dev_dbg does:
static inline int __attribute_
I like the ndev_printk idea.
I think a ndev_ printks should take a const netdev*
as the first argument.
Also, better for the non-debug use of ndev_dbg is to have a
static inline function so printf args are verified.
For instance, dev_dbg does:
static inline int __attribute__ ((format (printf, 2
On Mon, 11 Jun 2007 10:30:26 -0700
"Kok, Auke" <[EMAIL PROTECTED]> wrote:
> Stephen Hemminger wrote:
> > On Fri, 08 Jun 2007 16:42:31 -0700
> > "Kok, Auke" <[EMAIL PROTECTED]> wrote:
> >
> >> Stephen Hemminger wrote:
>
> +#define ndev_printk(kern_level, netif_level, netdev, format, ar
Stephen Hemminger wrote:
On Fri, 08 Jun 2007 16:42:31 -0700
"Kok, Auke" <[EMAIL PROTECTED]> wrote:
Stephen Hemminger wrote:
+#define ndev_printk(kern_level, netif_level, netdev, format, arg...) \
+ do { if ((netdev)->msg_enable & NETIF_MSG_##netif_level) { \
+ printk(kern
Stephen Hemminger wrote:
On Fri, 08 Jun 2007 16:42:31 -0700
"Kok, Auke" <[EMAIL PROTECTED]> wrote:
Stephen Hemminger wrote:
+#define ndev_printk(kern_level, netif_level, netdev, format, arg...) \
+ do { if ((netdev)->msg_enable & NETIF_MSG_##netif_level) { \
+ printk(kern
Stephen Hemminger wrote:
On Fri, 08 Jun 2007 16:42:31 -0700
"Kok, Auke" <[EMAIL PROTECTED]> wrote:
Stephen Hemminger wrote:
+#define ndev_printk(kern_level, netif_level, netdev, format, arg...) \
+ do { if ((netdev)->msg_enable & NETIF_MSG_##netif_level) { \
+ printk(kern
On Fri, 08 Jun 2007 16:42:31 -0700
"Kok, Auke" <[EMAIL PROTECTED]> wrote:
> Stephen Hemminger wrote:
> >>
> >> +#define ndev_printk(kern_level, netif_level, netdev, format, arg...) \
> >> + do { if ((netdev)->msg_enable & NETIF_MSG_##netif_level) { \
> >> + printk(kern_level "%s: " for
Stephen Hemminger wrote:
+#define ndev_printk(kern_level, netif_level, netdev, format, arg...) \
+ do { if ((netdev)->msg_enable & NETIF_MSG_##netif_level) { \
+ printk(kern_level "%s: " format, \
+ (netdev)->name, ## arg); } } while (0)
Could you make a vers
>
> +#define ndev_printk(kern_level, netif_level, netdev, format, arg...) \
> + do { if ((netdev)->msg_enable & NETIF_MSG_##netif_level) { \
> + printk(kern_level "%s: " format, \
> + (netdev)->name, ## arg); } } while (0)
Could you make a version that doesn't evalua
A lot of netdevices implement their own variant of printk and use
use variations of dev_printk, printk or others that use msg_enable,
which has been an eyesore with countless variations across drivers.
This patch implements a standard ndev_printk and derivatives
such as ndev_err, ndev_info, ndev_w
19 matches
Mail list logo