lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1265782578.20626.17.camel@Joe-Laptop.home>
Date:	Tue, 09 Feb 2010 22:16:18 -0800
From:	Joe Perches <joe@...ches.com>
To:	David Brownell <david-b@...bell.net>
Cc:	Greg Kroah-Hartman <gregkh@...e.de>, linux-usb@...r.kernel.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Oliver Neukum <oliver@...kum.name>,
	Peter Korsgaard <jacmet@...site.dk>,
	Steve Glendinning <steve.glendinning@...c.com>
Subject: Re: [PATCH] usbnet: convert dev(dbg|err|warn|info) macros to
 usbnet_(dbg|err|warn|info)

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@...rs.sourceforge.net>
> ... should merge via netdev.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ