Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753408Ab3EaHX0 (ORCPT ); Fri, 31 May 2013 03:23:26 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38496 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751997Ab3EaHXR (ORCPT ); Fri, 31 May 2013 03:23:17 -0400 Date: Fri, 31 May 2013 09:23:57 +0200 Message-ID: From: Takashi Iwai To: Joe Perches Cc: Jaroslav Kysela , Alan Stern , alsa-devel@alsa-project.org, Kernel development list Subject: Re: [alsa-devel] Improving or replacing snd_printk() In-Reply-To: <1369983967.10556.48.camel@joe-AO722> References: <51A79F25.6040007@perex.cz> <1369983967.10556.48.camel@joe-AO722> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2326 Lines: 67 At Fri, 31 May 2013 00:06:07 -0700, Joe Perches wrote: > > On Fri, 2013-05-31 at 08:37 +0200, Takashi Iwai wrote: > > It's a problem only with snd_printk(), as CONFIG_SND_VERBOSE_PRINTK > > influences on the behavior of snd_printk() and not on the debug prints > > with snd_printd() & co. > > Are you're perhaps confused about how CONFIG_SND_VERBOSE_PRINTK > works with or varies between snd_printd and snd_printk? > > #if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) > __printf(4, 5) > void __snd_printk(unsigned int level, const char *file, int line, > const char *format, ...); > > ... > > #define snd_printk(fmt, args...) \ > __snd_printk(0, __FILE__, __LINE__, fmt, ##args) > > #ifdef CONFIG_SND_DEBUG > [...] > #define snd_printd(fmt, args...) \ > __snd_printk(1, __FILE__, __LINE__, fmt, ##args) > > I don't see a difference. Erm, indeed. I thought we enabled the verobse prinkt always for debug prints. But it's not. It's more reason for dropping CONFIG_SND_VERBOSE_PRINTK :) > > Hence, the goal we should achieve is rather to drop > > CONFIG_SND_VERBOSE_PRINTK. *This* is the useless thing. > > Maybe. > > > Meanwhile, many snd_printk() messages might start looking annoying > > with the extra information. If so, such lines should be replaced with > > the standard prints like dev_*(). I think almost all snd_printk() > > like below are better replaced with standard ones. > > below? Was there something that was supposed to be below? > Are you referring to the KERN_ERR/urb example above? Sorry, scratch it. Just a typo during changing the lines. > > So, alternatively, we can begin with replacing some snd_printk() with > > the standard functions, then dropping CONFIG_SND_VERBOSE_PRINTK. > > Dropping CONFIG_SND_VERBOSE_PRINTK would simplify code a bit. > > > I think most of snd_printd() and snd_printdd() can be kept as is. > > These are just debug messages, after all. > > Some of those are emitted at levels other than KERN_DEBUG. > I think that odd. Yeah, they aren't good, but it's a different topic. Takashi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/