lkml.org 
[lkml]   [2010]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] usbnet: convert dev(dbg|err|warn|info) macros to usbnet_(dbg|err|warn|info)
    From
    Date
    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@users.sourceforge.net>
    > ... should merge via netdev.




    \
     
     \ /
      Last update: 2010-02-10 07:19    [W:0.036 / U:0.000 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site