Re: [PATCH] usbnet: convert dev(dbg|err|warn|info) macros to usbnet_(dbg|err|warn|info)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2010-02-09 at 21:53 -0800, David Brownell wrote: 
> On Tuesday 09 February 2010, Joe Perches wrote:
> > These macros are too similar to the dev_<level> equivalents
> > but take a usbnet * argument.
> 
> FYI the history behind that, as I recall, was that the names
> were part of the effort to get rid of kernel 2.4 USB-specific
> macros like err() and info(), or maybe uppercased versions of
> them ... where the dev_err() style messaging wasn't so helpful,
> since it didn't say which network device was involved.

Maybe these usbnet_printk macros could use the proposed
netdev_printk macros instead.

http://patchwork.ozlabs.org/patch/44955/

Maybe:

#define usbnet_dbg(usbnet, fmt, arg...)		\
	netdev_dbg((usbnet)->net, fmt, ##arg)
#define usbnet_err(usbnet, fmt, arg...)		\
	netdev_err((usbnet)->net, fmt, ##arg)
#define usbnet_warn(usbnet, fmt, arg...)	\
	netdev_err((usbnet)->net, fmt, ##arg)
#define usbnet_info(usbnet, fmt, arg...)	\
	netdev_info((usbnet)->net, fmt, ##arg)

or just use netdev_printks directly.

> Good point that this should be improved.

I neglected to mention that to make the use
style more like the rest of kernel source, this
patch also changes the macro definitions by
removing the \n added to the format and adds the
trailing "\n" to the callers.

Except for the first one. (oops)

> Acked-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>
> ... should merge via netdev.


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux