All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
	alsa-devel@alsa-project.org,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	tiwai@suse.de,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Curtis Malainey <curtis@malainey.com>
Subject: Re: [PATCH 2/5] ASoC: Intel: bdw-rt5677: fix module load/unload issues
Date: Tue, 23 Jun 2020 10:37:07 +0100	[thread overview]
Message-ID: <20200623093707.GA5582@sirena.org.uk> (raw)
In-Reply-To: <20200623084011.GM2428291@smile.fi.intel.com>

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

On Tue, Jun 23, 2020 at 11:40:11AM +0300, Andy Shevchenko wrote:
> On Mon, Jun 22, 2020 at 07:26:51PM +0100, Mark Brown wrote:
> > On Mon, Jun 22, 2020 at 01:23:04PM -0500, Pierre-Louis Bossart wrote:

> > > So I explicitly added a test for all possible cases. I don't mind removing
> > > the _OR_NULL if indeed it's safe, but showing this redundancy also shows an
> > > intent to deal with such cases.

> > Yeah, I think that's fine - it's perhaps redundant but we're not in a
> > hot path and as well as the intentionality it saves the reader from
> > having to know if gpiod_put() copes with NULL or not.

> What the point?
> We can document this instead of being a dead code, right?

To a certain extent the _OR_NULL is documentation - the effect is the
same with or without it.

> IS_ERR() may happen there only if we assign such pointer to be error. Is it possible case here?

That one is a bit more real.

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

  reply	other threads:[~2020-06-23  9:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22 15:42 [PATCH 0/5] ASoC: add dailink .exit() callback Pierre-Louis Bossart
2020-06-22 15:42 ` [PATCH 1/5] ASoC: soc-link: introduce exit() callback Pierre-Louis Bossart
2020-06-22 23:54   ` Kuninori Morimoto
2020-06-23 14:50     ` Pierre-Louis Bossart
2020-06-24 23:25       ` Kuninori Morimoto
2020-06-22 15:42 ` [PATCH 2/5] ASoC: Intel: bdw-rt5677: fix module load/unload issues Pierre-Louis Bossart
2020-06-22 18:18   ` Andy Shevchenko
2020-06-22 18:23     ` Pierre-Louis Bossart
2020-06-22 18:26       ` Mark Brown
2020-06-23  8:40         ` Andy Shevchenko
2020-06-23  9:37           ` Mark Brown [this message]
2020-06-23  8:43       ` Andy Shevchenko
2020-06-24 19:14   ` Cezary Rojewski
2020-06-24 20:06     ` Pierre-Louis Bossart
2020-06-24 20:26       ` Cezary Rojewski
2020-06-22 15:42 ` [PATCH 3/5] ASoC: Intel: kbl-rt5660: use .exit() dailink callback to release gpiod Pierre-Louis Bossart
2020-06-22 18:20   ` Andy Shevchenko
2020-06-22 18:26     ` Pierre-Louis Bossart
2020-06-23  8:39       ` Andy Shevchenko
2020-06-22 15:42 ` [PATCH 4/5] ASoC: intel: sof_rt5682: move disabling jack to dai link's exit() Pierre-Louis Bossart
2020-06-22 15:42 ` [PATCH 5/5] ASoC: intel: cml_rt1011_rt5682: disable jack in dailink .exit() Pierre-Louis Bossart
2020-06-23 12:39 ` [PATCH 0/5] ASoC: add dailink .exit() callback 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=20200623093707.GA5582@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=curtis@malainey.com \
    --cc=guennadi.liakhovetski@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 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.