mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Amitoj Kaur Chawla <amitoj1606@gmail.com>,
	Frank Rowand <frowand.list@gmail.com>,
	Grant Likely <grant.likely@linaro.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH v2] of: resolver: Add missing of_node_get and of_node_put
Date: Fri, 12 Feb 2016 09:58:03 +0200	[thread overview]
Message-ID: <D5B54AEC-F0D6-4155-8633-27A7EFF13B3C@konsulko.com> (raw)
In-Reply-To: <CAL_JsqLSHrJWNJijv2Y1ZsXVa98PVBhg2kHn+t_eoH90GDLGAA@mail.gmail.com>

Hi Rob,

> On Feb 12, 2016, at 01:18 , Rob Herring <robh+dt@kernel.org> wrote:
> 
> On Wed, Feb 3, 2016 at 12:09 PM, Amitoj Kaur Chawla
> <amitoj1606@gmail.com> wrote:
>> In __of_find_node_by_full_name, add an of_node_get when detecting the
>> desired element, to ensure that it ends up with a reference count that is
>> one greater than on entering the function.
>> 
>> Also in __of_find_node_by_full_name, add an of_node_put on breaking
>> out of the for_each_child_of_node loop, to ensure that the reference
>> count of the returned value is not double incremented. This change
>> was made using Coccinelle.
> 
> Pantelis, are you convinced this is correct (albeit somewhat pointless)?
> 

This is good enough. It’s a local method and we won’t ever try to use
it outside of the resolver. We need to fix the reference counting properly
sometime in the future.

> Rob

Regards

— Pantelis

      reply	other threads:[~2016-02-12  7:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 18:09 Amitoj Kaur Chawla
2016-02-11 23:18 ` Rob Herring
2016-02-12  7:58   ` Pantelis Antoniou [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=D5B54AEC-F0D6-4155-8633-27A7EFF13B3C@konsulko.com \
    --to=pantelis.antoniou@konsulko.com \
    --cc=amitoj1606@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@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 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®