From: Tony Breeds <tony@bakeyournoodle.com>
To: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Cc: David Airlie <airlied@linux.ie>,
Brian King <brking@linux.vnet.ibm.com>,
dri-devel@lists.freedesktop.org,
Alex Deucher <alexander.deucher@amd.com>,
Jerome Glisse <jglisse@redhat.com>,
Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCHv4 1/2] ppc64: perform proper max_bus_speed detection
Date: Fri, 3 May 2013 16:40:08 +1000 [thread overview]
Message-ID: <20130503064008.GB4260@thor.bakeyournoodle.com> (raw)
In-Reply-To: <51828481.2090406@linux.vnet.ibm.com>
[-- Attachment #1.1: Type: text/plain, Size: 875 bytes --]
On Thu, May 02, 2013 at 12:21:37PM -0300, Kleber Sacilotto de Souza wrote:
> Hi Tony,
>
> It seems Lucas' change is a bit incomplete and is not handling the reference counter to
> the device_node correctly. Is the following change what you had in mind?
Ahh Sorry I expected there would be a for_each_parent_of_node macro.
I did a quick grep and it seems that's not very common, so open coding
it should be fine.
>
> dn = pcibios_get_phb_of_node(bus);
> if (!dn)
> return 0;
>
> for (pdn = dn; pdn != NULL; pdn = of_get_next_parent(pdn)) {
> pcie_link_speed_stats = (const uint32_t *) of_get_property(pdn,
> "ibm,pcie-link-speed-stats", NULL);
> if (pcie_link_speed_stats)
> break;
> }
>
> of_node_put(pdn);
I think you need the of_node_put() in the body of the loop, otherwise
aren't you leaking refcounts?
Yours Tony
[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
next prev parent reply other threads:[~2013-05-03 6:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 22:54 [PATCHv4 0/2] Speed Cap fixes for ppc64 lucaskt
2013-04-24 22:54 ` [PATCHv4 1/2] ppc64: perform proper max_bus_speed detection lucaskt
2013-04-24 23:48 ` Tony Breeds
2013-04-25 17:34 ` Lucas Kannebley Tavares
2013-05-02 15:21 ` Kleber Sacilotto de Souza
2013-05-03 6:40 ` Tony Breeds [this message]
2013-05-03 11:55 ` Kleber Sacilotto de Souza
2013-04-24 22:54 ` [PATCHv4 2/2] radeon: use max_bus_speed to activate gen2 speeds lucaskt
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=20130503064008.GB4260@thor.bakeyournoodle.com \
--to=tony@bakeyournoodle.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=bhelgaas@google.com \
--cc=brking@linux.vnet.ibm.com \
--cc=cascardo@linux.vnet.ibm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jglisse@redhat.com \
--cc=klebers@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.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