From: Mark Brown <broonie@kernel.org>
To: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Cc: linux-kernel@vger.kernel.org, rafael@kernel.org,
gregkh@linuxfoundation.org, enric.balletbo@collabora.com,
kernel@collabora.com, dafna3@gmail.com
Subject: Re: [PATCH] regmap: debugfs: potentially duplicate the name string of the config
Date: Tue, 8 Sep 2020 17:47:26 +0100 [thread overview]
Message-ID: <20200908164726.GG5551@sirena.org.uk> (raw)
In-Reply-To: <455274f0-718c-9247-da29-6122687720eb@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]
On Tue, Sep 08, 2020 at 06:07:56PM +0200, Dafna Hirschfeld wrote:
> Am 08.09.20 um 17:35 schrieb Mark Brown:
> > It does not follow that the name should be copied, it equally follows
> > (and is expected by the API given that the common case is that the name
> > is a static string assigned at build time) that the caller should not
> > free the string while the regmap is active.
> I see that the same copy is already done in function __regmap_init in drivers/base/regmap/regmap.c
> added in patch 8253bb3f82554 "regmap: potentially duplicate the name string stored in regmap"
> so I thought I'll do the same.
Hrm, right. In that case why not just use that copy we've already
taken?
> > > This fixes an error
> > > "debugfs: Directory 'dummy-' with parent 'regmap' already present!"
> > > where the name was freed in function of_syscon_register before
> > > it was accessed.
> > Fix the caller. It is *very* much unclear to me why a syscon would be
> > assigning a name for a regmap it creates in the first place.
> I'll have a deeper look.
Whatever happens that caller looks like it shouldn't be creating an
additional name unless I'm missing something about the context.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2020-09-08 16:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 15:28 Dafna Hirschfeld
2020-09-08 15:35 ` Mark Brown
2020-09-08 16:07 ` Dafna Hirschfeld
2020-09-08 16:47 ` 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=20200908164726.GG5551@sirena.org.uk \
--to=broonie@kernel.org \
--cc=dafna.hirschfeld@collabora.com \
--cc=dafna3@gmail.com \
--cc=enric.balletbo@collabora.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@collabora.com \
--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
all inboxes | Powered by JetHome®