All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: frowand.list@gmail.com, Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Tony Lindgren <tony@atomide.com>, Scott Wood <oss@buserror.net>,
	Kumar Gala <galak@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>, Arnd Bergmann <arnd@arndb.de>,
	Grant Likely <grant.likely@linaro.org>,
	Jingoo Han <jingoohan1@gmail.com>,
	Lee Jones <lee.jones@linaro.org>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	"H. Nikolaus Schaller" <hns@goldelico.com>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [RFC/PATCH] of: of_find_node_by_name - stop dropping reference to 'from' node
Date: Fri, 22 Apr 2016 08:42:23 +1000	[thread overview]
Message-ID: <1461278543.3135.16.camel@kernel.crashing.org> (raw)
In-Reply-To: <571955A4.7080706@gmail.com>

On Thu, 2016-04-21 at 15:35 -0700, Frank Rowand wrote:
> No.  It is correct for of_find_by_name() to call of_node_put() for
> the from argument.  The callers should be fixed.

I would argue that if everybody makes the same mistake then our
interface is wrong. In that case I wrote it so I think I can plead
guilty to the mistake ;-)

In hindsight, but I don't have the stammina to do a tree-wide change, I
think we should have differenciated:

	of_find_xxx which does *not* drop the reference

	of_find_next_xxx which does

Cheers,
Ben.

      reply	other threads:[~2016-04-21 22:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19 17:05 [RFC/PATCH] of: of_find_node_by_name - stop dropping reference to 'from' node Dmitry Torokhov
2016-04-19 17:05 ` Dmitry Torokhov
2016-04-21 22:35 ` Frank Rowand
2016-04-21 22:35   ` Frank Rowand
2016-04-21 22:42   ` Benjamin Herrenschmidt [this message]

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=1461278543.3135.16.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=frowand.list@gmail.com \
    --cc=galak@kernel.crashing.org \
    --cc=grant.likely@linaro.org \
    --cc=hns@goldelico.com \
    --cc=jingoohan1@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oss@buserror.net \
    --cc=paulus@samba.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=robh+dt@kernel.org \
    --cc=tomi.valkeinen@ti.com \
    --cc=tony@atomide.com \
    /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.