From: Mark Brown <broonie@kernel.org>
To: Fabio Estevam <festevam@gmail.com>
Cc: david@lechnology.com, linux-kernel@vger.kernel.org,
Fabio Estevam <fabio.estevam@nxp.com>
Subject: Re: [PATCH] regmap: debugfs: Do not print warning when no device is associated
Date: Mon, 5 Mar 2018 16:17:39 +0000 [thread overview]
Message-ID: <20180305161739.GN8588@sirena.org.uk> (raw)
In-Reply-To: <1520017960-5120-1-git-send-email-festevam@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]
On Fri, Mar 02, 2018 at 04:12:40PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> Commit 9b947a13e7f6 ("regmap: use debugfs even when no device")
> allows the usage of regmap debugfs even when there is no device
> associated, which causes several warnings like this:
> (NULL device *): Failed to create debugfs directory
> Do not print the warning in the case there is no associated device.
> map->debugfs = debugfs_create_dir(name, regmap_debugfs_root);
> if (!map->debugfs) {
> - dev_warn(map->dev, "Failed to create debugfs directory\n");
> + if (map->dev)
> + dev_warn(map->dev,
> + "Failed to create debugfs directory\n");
This then means that we will just randomly not create a debugfs for
anything except the first device that tries to do so with no device
which doesn't seem right. We should try harder to create a name here,
for example we could try printing the pointer to the map. Or keep a
counter and use dummy0 and so on.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-03-05 16:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-02 19:12 Fabio Estevam
2018-03-05 16:17 ` Mark Brown [this message]
2018-03-05 18:29 ` Fabio Estevam
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=20180305161739.GN8588@sirena.org.uk \
--to=broonie@kernel.org \
--cc=david@lechnology.com \
--cc=fabio.estevam@nxp.com \
--cc=festevam@gmail.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®