From: Vinod Koul <vkoul@kernel.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Greg KH <gregkh@linuxfoundation.org>
Cc: alsa-devel@alsa-project.org, tiwai@suse.de,
linux-kernel@vger.kernel.org, liam.r.girdwood@linux.intel.com,
broonie@kernel.org, srinivas.kandagatla@linaro.org,
jank@cadence.com, joe@perches.com,
Sanyog Kale <sanyog.r.kale@intel.com>
Subject: Re: [alsa-devel] [RFC PATCH 5/7] soundwire: add debugfs support
Date: Mon, 6 May 2019 22:08:10 +0530 [thread overview]
Message-ID: <20190506163810.GK3845@vkoul-mobl.Dlink> (raw)
In-Reply-To: <a9e1c3d2-fe29-1683-9253-b66034c62010@linux.intel.com>
On 06-05-19, 09:48, Pierre-Louis Bossart wrote:
> > > +struct dentry *sdw_bus_debugfs_get_root(struct sdw_bus_debugfs *d)
> > > +{
> > > + if (d)
> > > + return d->fs;
> > > + return NULL;
> > > +}
> > > +EXPORT_SYMBOL(sdw_bus_debugfs_get_root);
> >
> > _GPL()?
>
> Oops, that's a big miss. will fix, thanks for spotting this.
Not really. The Soundwire code is dual licensed. Many of the soundwire
symbols are indeed exported as EXPORT_SYMBOL. But I agree this one is
'linux' specific so can be made _GPL.
Pierre, does Intel still care about this being dual licensed or not?
>
> >
> > But why is this exported at all? No one calls this function.
>
> I will have to check.
It is used by codec driver which are not upstream yet. So my suggestion
would be NOT to export this and only do so when we have users for it
That would be true for other APIs exported out as well.
> >
> > > +struct sdw_slave_debugfs {
> > > + struct sdw_slave *slave;
> >
> > Same question as above, why do you need this pointer?
>
> will check.
The deubugfs code does hold a ref to slave object to read the data and
dump, this particular instance might be able to get rid of (should be
doable)
> > And meta-comment, if you _EVER_ save off a pointer to a reference
> > counted object (like this and the above one), you HAVE to grab a
> > reference to it, otherwise it can go away at any point in time as that
> > is the point of reference counted objects.
> >
> > So even if you do need/want this, you have to properly handle the
> > reference count by incrementing/decrementing it as needed.
Yes, but then device exit routine is supposed to do debugfs cleanup as
well, so that would ensure these references are dropped at that point of
time. Greg should that not take care of it or we *should* always do
refcounting.
Thanks
--
~Vinod
next prev parent reply other threads:[~2019-05-06 16:38 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 1:00 [RFC PATCH 0/7] soundwire: add sysfs and " Pierre-Louis Bossart
2019-05-04 1:00 ` [RFC PATCH 1/7] soundwire: Add sysfs support for master(s) Pierre-Louis Bossart
2019-05-04 6:52 ` Greg KH
2019-05-06 16:43 ` [alsa-devel] " Pierre-Louis Bossart
2019-05-07 2:24 ` Pierre-Louis Bossart
2019-05-07 5:27 ` Vinod Koul
2019-05-07 5:54 ` Greg KH
2019-05-07 11:03 ` Vinod Koul
2019-05-07 11:19 ` Greg KH
2019-05-07 22:49 ` Pierre-Louis Bossart
2019-05-08 7:46 ` Vinod Koul
2019-05-08 9:16 ` Greg KH
2019-05-08 16:42 ` Pierre-Louis Bossart
2019-05-08 16:59 ` Greg KH
[not found] ` <0b8d5238-6894-e2b4-5522-28636e40dd63@linux.intel.com>
2019-05-09 4:26 ` Vinod Koul
2019-05-09 18:18 ` Greg KH
2019-05-04 1:00 ` [RFC PATCH 2/7] soundwire: add Slave sysfs support Pierre-Louis Bossart
2019-05-04 6:54 ` Greg KH
2019-05-06 14:42 ` [alsa-devel] " Pierre-Louis Bossart
2019-05-06 15:19 ` Greg KH
2019-05-06 16:22 ` Vinod Koul
2019-05-06 16:46 ` Pierre-Louis Bossart
2019-05-07 5:19 ` Vinod Koul
2019-05-07 13:54 ` Pierre-Louis Bossart
2019-05-08 7:40 ` Vinod Koul
2019-05-08 16:51 ` Pierre-Louis Bossart
2019-05-04 1:00 ` [RFC PATCH 3/7] ABI: testing: Add description of soundwire master sysfs files Pierre-Louis Bossart
2019-05-04 6:53 ` Greg KH
2019-05-06 16:24 ` Vinod Koul
2019-05-04 1:00 ` [RFC PATCH 4/7] ABI: testing: Add description of soundwire slave " Pierre-Louis Bossart
2019-05-04 1:00 ` [RFC PATCH 5/7] soundwire: add debugfs support Pierre-Louis Bossart
2019-05-04 7:03 ` Greg KH
2019-05-06 14:48 ` [alsa-devel] " Pierre-Louis Bossart
2019-05-06 16:38 ` Vinod Koul [this message]
2019-05-06 16:54 ` Pierre-Louis Bossart
2019-05-07 5:56 ` Greg KH
2019-05-04 1:00 ` [RFC PATCH 6/7] soundwire: cadence_master: add debugfs register dump Pierre-Louis Bossart
2019-05-04 7:03 ` Greg KH
2019-05-06 14:50 ` [alsa-devel] " Pierre-Louis Bossart
2019-05-04 7:04 ` Greg KH
2019-05-04 1:00 ` [RFC PATCH 7/7] soundwire: intel: " Pierre-Louis Bossart
2019-05-04 7:04 ` Greg KH
2019-05-06 14:51 ` [alsa-devel] " Pierre-Louis Bossart
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=20190506163810.GK3845@vkoul-mobl.Dlink \
--to=vkoul@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jank@cadence.com \
--cc=joe@perches.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=sanyog.r.kale@intel.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.de \
/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®