From: Mark Brown <broonie@sirena.org.uk>
To: Takashi Iwai <tiwai@suse.de>
Cc: Zhaolei <zhaolei@cn.fujitsu.com>,
alsa-devel@alsa-project.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
lrg@slimlogic.co.uk
Subject: Re: [alsa-devel] [PATCH] Fix debugfs_create_dir's error checking method for sound/soc/
Date: Fri, 17 Oct 2008 16:28:36 +0100 [thread overview]
Message-ID: <20081017152833.GI2546@sirena.org.uk> (raw)
In-Reply-To: <s5hfxmvw8lq.wl%tiwai@suse.de>
On Fri, Oct 17, 2008 at 05:21:21PM +0200, Takashi Iwai wrote:
> This looks like a design. In linux/debugfs.h:
Yeah, so my grovelling through the code after I wrote that e-mail
showed.
> /*
> * We do not return NULL from these functions if CONFIG_DEBUG_FS is not enabled
> * so users have a chance to detect if there was a real error or not. We don't
> * want to duplicate the design decision mistakes of procfs and devfs again.
> */
> Though, I agree that the detailed error information is lost by
> returning NULL...
Yes, not to mention the fact that using both error reporting interfaces
makes writing client code more error prone. Looking at the users most
seem to only check one kind of error code is returned.
For ASoC checking only for null would actually be good enough - even if
-ENODEV is returned we only ever pass the pointers into other debugfs
functions so the fact that the pointer is bogus makes no odds, it'll
never actually be dereferenced.
prev parent reply other threads:[~2008-10-17 15:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-17 13:04 Zhaolei
2008-10-17 13:23 ` Mark Brown
2008-10-17 15:21 ` [alsa-devel] " Takashi Iwai
2008-10-17 15:26 ` Takashi Iwai
2008-10-17 15:28 ` Mark Brown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081017152833.GI2546@sirena.org.uk \
--to=broonie@sirena.org.uk \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=tiwai@suse.de \
--cc=zhaolei@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®