mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jean-Francois Moine <moinejf@free.fr>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Russell King <linux@arm.linux.org.uk>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] ASoC: Remove 'const' from the device_node pointers
Date: Tue, 25 Nov 2014 13:49:01 +0000	[thread overview]
Message-ID: <20141125134901.GF7712@sirena.org.uk> (raw)
In-Reply-To: <547485CF.4050600@metafoo.de>

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

On Tue, Nov 25, 2014 at 02:36:15PM +0100, Lars-Peter Clausen wrote:
> On 11/25/2014 02:13 PM, Mark Brown wrote:

> >So, we're not holding references here (we're just doing comparisons, the
> >references need to be owned before we get into the core)

> The core itself will only do the comparisons and it is the board drivers
> responsibility to get and put the references. Making the pointers non const
> allows the board driver to use them to put the reference once the card has
> been unregistered rather than having to keep a separate set of pointers

Wouldn't it be even better to have managed OF references and not need to
explicitly dereference at all?  Otherwise every time something uses
managed resources for the card or component we've got a (marginal
admittedly) reference management bug.

> around. This should probably be mentioned in the commit message though.

Yes, it really should - this is really what I'm getting at here since
I'm frequently having to push back on difficult to understand changes
here.

> >I'm not seeing anything here removing casts?

> This patch used to be part of a two part series where the second patch
> removed the casts. This patch as already been applied though.

We don't have warnings at the minute...

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2014-11-25 13:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25 13:13 Mark Brown
2014-11-25 13:36 ` Lars-Peter Clausen
2014-11-25 13:49   ` Mark Brown [this message]
2014-11-25 22:30 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=20141125134901.GF7712@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=moinejf@free.fr \
    /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®