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:	Fri, 31 May 2013 10:24:51 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Takashi Iwai <tiwai@...e.de>
cc:	Joe Perches <joe@...ches.com>, Jaroslav Kysela <perex@...ex.cz>,
	<alsa-devel@...a-project.org>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: [alsa-devel] Improving or replacing snd_printk()

On Fri, 31 May 2013, Takashi Iwai wrote:

> > I don't see the complexity/hell in adding functions
> > for specific types of struct * to reduce the complexity
> > of the code though.  Centralizing those indirections
> > into functions also generally reduces overall code size.
> 
> I don't mind to add the struct pointer to new snd_*() -- if we really
> introduce them.  The bigger question is whether we really need to
> introduce such, and if yes, what variants.  And for that, I don't
> think we need to add many functions.  Maybe snd_card_<level>() would
> be good.  But others don't seem to make sense to me (remember that I
> suggest dropping CONFIG_SND_VERBOSE_PRINTK).

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.

I guess defining snd_card_*() to use card->card_dev makes the most 
sense.  If some code wants to use card->dev instead, it can pass that 
as the first argument to dev_*().

The most commonly used levels seem to be err, warn, info, and dbg.  
Those ought to be enough.  In fact, you probably could getting along 
without warn -- just err, info, and dbg.

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