From: Takashi Iwai Subject: Re: RFC - Clean up of ALSA kernel codes Date: Fri, 07 Oct 2005 16:50:44 +0200 Message-ID: References: <20051007143158.GA4598@palantir8> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20051007143158.GA4598@palantir8> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Martin Habets Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Fri, 7 Oct 2005 15:31:58 +0100, Martin Habets wrote: > > Takashi, > > I applaud you for doing this. An additional item I can think of is > a call to authors to make sure the first printk argument is correct. > i.e.: > printk(KERN_INFO "lvi_frag... > in stead of > printk("lvi_frag... Good point. > On a related note: Is there a MAINTAINERS list for alsa drivers? Should > there be? Or should we use the one in the linux kernel? Yes, that's a missing one currently in alsa-kernel tree. There is a file alsa-driver/doc/SOUNDCARDS. But it's really outdated... IMO, it's better to use kernel MAINTAINERS. The only tiny problem is that it's not in alsa-kernel tree directory per se. > Last but not least, I am personally confused when to use snd_printk, > snd_printd, snd_printdd or regular printk. On top of that there are > different debugging macros in different drivers. I'd appreciate any > guidelines you could give on this. I think it's OK in general to use the normal printk() everywhere instead of snd_printk(). snd_printk() can give you more precise place (file and line) with a config option, so it might be more helpful for debugging. But for the general error/informational messages, printk() would suffice if a proper prefix is given (e.g. "driver-foo: ERROR xxx"). snd_printd() is for debugging. snd_printdd() is for more deeper debugging :) Note that many distros turn on CONFIG_SND_DEBUG=yes, i.e. snd_printd() is enabled. So, snd_printd() shouldn't be used for the purpose to spit out logs too often. For such, use snd_printdd(). Takashi ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl