All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	patchwork-bot+notify@kernel.org
Subject: Re: [PATCH v2 2/4] ASoC: hdmi-codec: remove reference to the current substream
Date: Wed, 8 May 2019 17:57:58 +0900	[thread overview]
Message-ID: <20190508085758.GE14916@sirena.org.uk> (raw)
In-Reply-To: <fd633a5597703f557d75e43c14213699efe295f0.camel@baylibre.com>

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

On Wed, May 08, 2019 at 10:08:44AM +0200, Jerome Brunet wrote:
> On Wed, 2019-05-08 at 16:00 +0900, Mark Brown wrote:

> > The advantage of mutexes is that they are very simple and clear to
> > reason about.  It is therefore unclear that this conversion to use
> > atomic variables is an improvement, they're generally more complex 
> > to reason about and fragile.

> The point of this patch is not to remove the mutex in favor of atomic
> operations

Sure, but you mixed in a conversion to atomic operations as well.

> I can put back mutex to protect the flag if you prefer.

> Another solution would be to use the mutex as the 'busy' flag.
> Get the ownership of the hdmi using try_lock() in startup() and
> release it in shutdown()

> Would you have a preference Mark ? 

Probably using a mutex for the flag is clearer.  I'd rather keep things
as simple as absolutely possible to avoid people making mistakes in
future.

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

  reply	other threads:[~2019-05-08  8:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06  9:58 [PATCH v2 0/4] ASoC: hdmi-codec: fixes and improvements Jerome Brunet
2019-05-06  9:58 ` [PATCH v2 1/4] ASoC: hdmi-codec: remove function name debug traces Jerome Brunet
2019-05-08  6:50   ` Mark Brown
2019-05-08  8:08     ` Jerome Brunet
2019-05-08  9:01   ` Applied "ASoC: hdmi-codec: remove function name debug traces" to the asoc tree Mark Brown
2019-05-08  9:01     ` Mark Brown
2019-05-06  9:58 ` [PATCH v2 2/4] ASoC: hdmi-codec: remove reference to the current substream Jerome Brunet
2019-05-08  7:00   ` Mark Brown
2019-05-08  8:08     ` Jerome Brunet
2019-05-08  8:57       ` Mark Brown [this message]
2019-05-09  8:11         ` Jerome Brunet
2019-05-12  8:27           ` Mark Brown
2019-05-08  9:01   ` Applied "ASoC: hdmi-codec: remove reference to the current substream" to the asoc tree Mark Brown
2019-05-08  9:01     ` Mark Brown
2019-05-06  9:58 ` [PATCH v2 3/4] ASoC: hdmi-codec: remove reference to the dai drivers in the private data Jerome Brunet
2019-05-08  9:01   ` Applied "ASoC: hdmi-codec: remove reference to the dai drivers in the private data" to the asoc tree Mark Brown
2019-05-08  9:01     ` Mark Brown
2019-05-06  9:58 ` [PATCH v2 4/4] ASoC: hdmi-codec: remove ops dependency on the dai id Jerome Brunet
2019-05-08  9:01   ` Applied "ASoC: hdmi-codec: remove ops dependency on the dai id" to the asoc tree Mark Brown
2019-05-08  9:01     ` 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=20190508085758.GE14916@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=jbrunet@baylibre.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patchwork-bot+notify@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.