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]
Date:	Tue, 25 Jun 2013 13:55:42 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Rupesh Gujare <rupesh.gujare@...el.com>
cc:	Greg KH <gregkh@...uxfoundation.org>,
	<devel@...uxdriverproject.org>, <linux-usb@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <shigekatsu.tateno@...el.com>
Subject: Re: [PATCH] staging: ozwpan: Convert printk to dev_dbg()

On Tue, 25 Jun 2013, Rupesh Gujare wrote:

> On 25/06/13 18:02, Greg KH wrote:
> > On Tue, Jun 25, 2013 at 05:30:02PM +0100, Rupesh Gujare wrote:
> >> convert all debug messages from printk to dev_dbg() & add kernel config to
> >> enable/disable these messages during compilation.
> > No, just use the built-in dynamic debug code in the kernel, no need to
> > provide any new macros or functions or most importantly, no new Kconfig
> > options.
> >
> 
> New macro (oz_trace) is being used as pointer to "struct device *" is 
> not available in all functions for dev_dbg() function.
> Please let me know if there is better way to handle this, I will be 
> happy to rework on this.

It depends on the situation.  In many cases there _is_ a struct device
associated with the log message, even if a pointer to that device isn't
available in the function.  The proper solution in those cases is to
make it available, by passing the function an extra "struct device *"
argument.

In a few cases there really is no device associated with the message.  
For example, if the module prints out a message when it is first 
loaded, there probably is no device around at that time.  However, in 
most cases there _is_ an associated device.

Alan Stern

--
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