At Tue, 04 Jun 2013 23:15:21 -0700, Joe Perches wrote:
On Wed, 2013-06-05 at 08:04 +0200, Takashi Iwai wrote:
At Tue, 4 Jun 2013 16:54:12 -0400 (EDT), Alan Stern wrote:
On Tue, 4 Jun 2013, Joe Perches wrote:
[]
You didn't respond to the first point I raised. Since these messages are all meant for debugging, there's no point allowing them to have prefixes like KERN_ERR or KERN_INFO. They should always be printed at the KERN_DEBUG level. Or did you think this was so obviously true that it didn't require any comment?
Unfortunately, it's not so straightforward. Many messages are better with KERN_INFO indeed. In such places, snd_printd() is used rather as snd_chattier_printk_with_prefix().
In those cases, it's likely true that most of those should not be snd_printd but promoted to pr_<level>
Yes. These are snd_printd() just to be conditionally built in. But in most cases it's rather useful to print them (as most distros set CONFIG_SND_DEBUG=y). Hence practically they can be pr_info() nowadays.
Instead, we tended to put such informational messages as snd_printd(), while keeping the driver itself reticent as much as possible for "productive" systems. This style was kept for a while even after merged to 2.5 kernels until recently.
Also, some places use KERN_WARNING or KERN_ERR with snd_printd(), mostly because they are in the context with CONFIG_SND_DEBUG. They can be well pr_warning() or pr_err().
I thought the idea was to rationalize all that with the new printing styles. So on the whole, it seems we are agreeing strongly.
Yep, we can convert almost all snd_printk() with pr_*(), and usual snd_printd() with pr_debug(). There must be some exceptions, and they need care manually.
Takashi