From: Andrew Murray <andrew.murray@arm.com>
To: Thierry Reding <thierry.reding@avionic-design.de>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Grant Likely <grant.likely@secretlab.ca>,
Michal Simek <monstr@monstr.eu>,
Rob Herring <robherring2@gmail.com>,
devicetree-discuss <devicetree-discuss@lists.ozlabs.org>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Liviu Dudau <Liviu.Dudau@arm.com>
Subject: Re: [PATCH] pci: Provide support for parsing PCI DT ranges property
Date: Mon, 14 Jan 2013 09:15:26 +0000 [thread overview]
Message-ID: <20130114091526.GA23333@arm.com> (raw)
In-Reply-To: <20121220082500.GA32617@avionic-0098.adnet.avionic-design.de>
On Thu, Dec 20, 2012 at 08:25:00AM +0000, Thierry Reding wrote:
> On Wed, Dec 12, 2012 at 04:37:50PM +0000, Andrew Murray wrote:
> [...]
> > diff --git a/drivers/of/address.c b/drivers/of/address.c
> [...]
> > + start = of_get_property(node, "ranges", &rlen);
> > + if (start == NULL)
> > + return NULL;
> > +
> > + end = start + rlen;
>
> I'm currently rewriting large parts of the Tegra PCIe controller driver
> and I'm trying to use this new API. This seems to work fine, except that
> I think this line needs to be:
>
> end = start + rlen / sizeof(__be32);
>
> Otherwise we'll try to process 4 times as many ranges as there are.
>
> Thierry
Good catch. Thanks for taking this on.
Andrew Murray
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Murray <andrew.murray@arm.com>
To: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Michal Simek <monstr@monstr.eu>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
devicetree-discuss <devicetree-discuss@lists.ozlabs.org>,
Liviu Dudau <Liviu.Dudau@arm.com>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
Rob Herring <robherring2@gmail.com>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] pci: Provide support for parsing PCI DT ranges property
Date: Mon, 14 Jan 2013 09:15:26 +0000 [thread overview]
Message-ID: <20130114091526.GA23333@arm.com> (raw)
In-Reply-To: <20121220082500.GA32617@avionic-0098.adnet.avionic-design.de>
On Thu, Dec 20, 2012 at 08:25:00AM +0000, Thierry Reding wrote:
> On Wed, Dec 12, 2012 at 04:37:50PM +0000, Andrew Murray wrote:
> [...]
> > diff --git a/drivers/of/address.c b/drivers/of/address.c
> [...]
> > +=09start =3D of_get_property(node, "ranges", &rlen);
> > +=09if (start =3D=3D NULL)
> > +=09=09return NULL;
> > +
> > +=09end =3D start + rlen;
>=20
> I'm currently rewriting large parts of the Tegra PCIe controller driver
> and I'm trying to use this new API. This seems to work fine, except that
> I think this line needs to be:
>=20
> =09end =3D start + rlen / sizeof(__be32);
>=20
> Otherwise we'll try to process 4 times as many ranges as there are.
>=20
> Thierry
Good catch. Thanks for taking this on.
Andrew Murray
next prev parent reply other threads:[~2013-01-14 9:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 16:37 [PATCH] pci: Provide support for parsing PCI DT ranges property Andrew Murray
2012-12-12 16:37 ` Andrew Murray
2012-12-13 9:13 ` Thierry Reding
2012-12-13 9:13 ` Thierry Reding
2012-12-13 9:13 ` Thierry Reding
2012-12-13 9:45 ` Andrew Murray
2012-12-13 9:45 ` Andrew Murray
2012-12-13 10:03 ` Thierry Reding
2012-12-13 10:03 ` Thierry Reding
2012-12-13 10:03 ` Thierry Reding
2012-12-13 10:34 ` Andrew Murray
2012-12-13 10:34 ` Andrew Murray
2012-12-15 1:06 ` Grant Likely
2012-12-15 1:06 ` Grant Likely
2013-01-14 9:24 ` Andrew Murray
2013-01-14 9:24 ` Andrew Murray
2012-12-20 8:25 ` Thierry Reding
2012-12-20 8:25 ` Thierry Reding
2012-12-20 8:25 ` Thierry Reding
2013-01-14 9:15 ` Andrew Murray [this message]
2013-01-14 9:15 ` Andrew Murray
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=20130114091526.GA23333@arm.com \
--to=andrew.murray@arm.com \
--cc=Liviu.Dudau@arm.com \
--cc=benh@kernel.crashing.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=monstr@monstr.eu \
--cc=rob.herring@calxeda.com \
--cc=robherring2@gmail.com \
--cc=thierry.reding@avionic-design.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.