Subject: Re: [PATCH 1/2] [RFC] NET: Implement a standard ndev_printk family

From: Joe Perches <[email-masked]>
Date: Mon, 11 Jun 2007 11:28:12 -0700

I like the ndev_printk idea.

I think a ndev_<level> 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, 3)))
dev_dbg(struct device * dev, const char * fmt, ...)
{
        return 0;
}

Perhaps ndev_dbg should look like this:

static inline int __attribute ((format (printf, 3, 4)))
__ndev_dbg(const struct net_device *netdev, u32 level, const char *format, ...)
{
	return 0;
}

#define ndev_dbg(netdev, level, fmt, args...) \
	__ndev_dbg(netdev, NETIF_MSG_##level, fmt, ##args)