Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756221Ab3EaPiD (ORCPT ); Fri, 31 May 2013 11:38:03 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55843 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753694Ab3EaPh7 (ORCPT ); Fri, 31 May 2013 11:37:59 -0400 Date: Fri, 31 May 2013 17:38:40 +0200 Message-ID: From: Takashi Iwai To: Alan Stern Cc: Joe Perches , Jaroslav Kysela , , Kernel development list Subject: Re: [alsa-devel] Improving or replacing snd_printk() In-Reply-To: References: 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: 1324 Lines: 31 At Fri, 31 May 2013 11:33:44 -0400 (EDT), Alan Stern wrote: > > On Fri, 31 May 2013, Takashi Iwai wrote: > > > > struct snd_card contains pointers to two different devices: dev and > > > card_dev. Some contexts might want to use one of them for log messages > > > while other contexts might want to use the other. > > > > Yes, there are some corner cases, indeed. > > > > Also, another expected problem is that neither card->card_dev nor > > card->dev are set when snd_card_err() is called. Many drivers set the > > device pointers at the late stage just before the device > > registration. So, systematic replacements won't work as expected in > > many cases. (The same is applied for replacement with dev_*(), too.) > > Given that the drivers would have to be edited to fix up the snd_printk > calls, the device pointer assignments can be moved to an earlier stage > at the same time. But doing this would require understanding how the > driver works to some extent; it couldn't be done blindly. Yep, that's what I meant as "systematic replacements". 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/