From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org, "Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH] regmap: no need to check return value of debugfs_create functions
Date: Tue, 22 Jan 2019 17:43:52 +0100 [thread overview]
Message-ID: <20190122164352.GA24734@kroah.com> (raw)
In-Reply-To: <20190122163826.GC7579@sirena.org.uk>
On Tue, Jan 22, 2019 at 04:38:26PM +0000, Mark Brown wrote:
> On Tue, Jan 22, 2019 at 05:08:57PM +0100, Greg Kroah-Hartman wrote:
> > On Tue, Jan 22, 2019 at 03:56:06PM +0000, Mark Brown wrote:
>
> > > Given that all the rest of the function is doing is further debugfs
> > > operations and when it fails people trying to use the debugfs do welcome
> > > some diagnostics I'm not sure that's particularly helpful.
>
> > The only way it will fail is if we are out of memory. And you are in a
> > bigger mess then, no one cares about debugfs calls, just make them and
> > move on, you should never care about the result of such a call.
>
> No, it also fails if there's already something with the same name in
> debugfs which can happen as as a result of configuration. This gets
> confusing for users, they see the debugfs files they're expecting but
> the contents don't match up at all.
How can you allow a duplicate name for the other regmap stuff? Will
that not also cause a collision somewhere else?
Anyway, if this is that big of a problem, ok, but then your code will
run differently if debugfs is enabled or not, which isn't ok. Don't
rely on debugfs to do your name filtering for you :)
thanks,
greg k-h
next prev parent reply other threads:[~2019-01-22 16:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-22 15:21 [PATCH] regmap: no need to check return value of debugfs_create functions Greg Kroah-Hartman
2019-01-22 15:56 ` Mark Brown
2019-01-22 16:08 ` Greg Kroah-Hartman
2019-01-22 16:38 ` Mark Brown
2019-01-22 16:43 ` Greg Kroah-Hartman [this message]
2019-01-22 17:22 ` Mark Brown
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=20190122164352.GA24734@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).