alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Subject: Re: [RFC PATCH 2/3] ASoC: Intel: bdw-rt5677: fix module load/unload issues
Date: Thu, 5 Mar 2020 18:33:35 +0000	[thread overview]
Message-ID: <20200305183335.GK4046@sirena.org.uk> (raw)
In-Reply-To: <7c52ff6f-76ef-7c55-65e6-9c0437bb983a@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]

On Thu, Mar 05, 2020 at 12:08:57PM -0600, Pierre-Louis Bossart wrote:
> On 3/5/20 11:43 AM, Mark Brown wrote:
> > On Thu, Mar 05, 2020 at 08:51:03AM -0600, Pierre-Louis Bossart wrote:

> > > I *think* it's due to the need to use the codec component->dev, which is
> > > only available with the dailink callbacks - not on platform device probe
> > > which ends with the card registration.

> > Why do you have this need?  This is sounding a lot like the CODEC ought
> > to be requesting it...

> it's been that way since 2016 and the initial contribution. The Chrome folks
> might know more, I don't think anyone at Intel has worked on this code.

I'd have thought someone would've reviewed it on the way in?

> > > Well, the devm uses the component device, not the card device, so when
> > > removing the machine driver nothing should happen. The problem seems to be
> > > in the removal of the codec and component drivers.

> > Right, it's always a bad idea to do allocations with devm_ on a device
> > other than the one that you're currently working with - that clearly
> > leads to lifetime issues.

> that's precisely what I tried to correct.

In general the best (clearest, most robust) way to correct something
like this would be to continue to use devm_ but clean up the allocation
so that it's done by the device that is used.

> b) do you have any objections if we remove this devm_ use without trying to
> dig further into the gpio management. This is a 2015 product that we use to
> verify the SOF driver on Broadwell, not an Intel-owned device.

The main thing I'm missing with this is a coherent explanation of the
problem and how the changes proposed fix it.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-03-05 18:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 13:06 [RFC PATCH 0/3] ASoC: add dailink .exit() callback Pierre-Louis Bossart
2020-03-05 13:06 ` [RFC PATCH 1/3] ASoC: soc-core: introduce exit() callback for dailinks Pierre-Louis Bossart
2020-03-05 18:15   ` Mark Brown
2020-03-05 13:06 ` [RFC PATCH 2/3] ASoC: Intel: bdw-rt5677: fix module load/unload issues Pierre-Louis Bossart
2020-03-05 13:25   ` Andy Shevchenko
2020-03-05 13:37     ` Pierre-Louis Bossart
2020-03-05 13:36   ` Mark Brown
2020-03-05 13:47     ` Pierre-Louis Bossart
2020-03-05 13:59       ` Mark Brown
2020-03-05 14:51         ` Pierre-Louis Bossart
2020-03-05 17:43           ` Mark Brown
2020-03-05 18:08             ` Pierre-Louis Bossart
2020-03-05 18:33               ` Mark Brown [this message]
2020-03-05 19:10                 ` Mark Brown
2020-03-05 21:00                   ` Curtis Malainey
2020-03-05 21:48                   ` Pierre-Louis Bossart
2020-03-06 13:12                     ` Mark Brown
2020-03-05 14:06       ` Amadeusz Sławiński
2020-03-05 14:11         ` Mark Brown
2020-03-05 14:27       ` Andy Shevchenko
2020-03-05 17:58         ` Mark Brown
2020-03-05 13:06 ` [RFC PATCH 3/3] ASoC: Intel: kbl-rt5660: use .exit() dailink callback to release gpiod Pierre-Louis Bossart
2020-03-05 13:27   ` Andy Shevchenko

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=20200305183335.GK4046@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).