From: "Cousson, Benoit" <b-cousson@ti.com>
To: "Shilimkar, Santosh" <santosh.shilimkar@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"R, Sricharan" <r.sricharan@ti.com>,
Paul Walmsley <paul@pwsan.com>, "Hilman, Kevin" <khilman@ti.com>
Subject: Re: [PATCH 1/8] OMAP: hwmod: Fix the addr spaces count API.
Date: Thu, 8 Sep 2011 09:47:55 +0200 [thread overview]
Message-ID: <4E68732B.60209@ti.com> (raw)
In-Reply-To: <1315459327-3285-2-git-send-email-santosh.shilimkar@ti.com>
Hi Sricharan,
On 9/8/2011 7:22 AM, Shilimkar, Santosh wrote:
> From: sricharan<r.sricharan@ti.com>
>
> The address space count API returns the number of address space
> entries for a hwmod including a additional null value present in the
> address space structure introduced recently.
That's a minor nit, but you might give the commit you are referencing here.
> The devices which
> have multiple hwmods and use device_build_ss are broken with this,
> as their address resources are populated with a extra null value,
> subsequently the probe fails. So fix the API not to add the null value.
It seems that in every cases, we are adding an extra null resource for
nothing. But it is true that will not crash if the driver is just
expecting an unique entry.
What is happening with multiple hwmods is probably the introduction of
that extra null resource in the middle of the real ones, hence shifting
the resource index?
You might give more details here.
> Signed-off-by: sricharan<r.sricharan@ti.com>
> Signed-off-by: Santosh Shilimkar<santosh.shilimkar@ti.com>
> Cc: Benoit Cousson<b-cousson@ti.com>
> Cc: Paul Walmsley<paul@pwsan.com>
> Cc: Kevin Hilman<khilman@ti.com>
> ---
> arch/arm/mach-omap2/omap_hwmod.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> index 84cc0bd..32a0f48a 100644
> --- a/arch/arm/mach-omap2/omap_hwmod.c
> +++ b/arch/arm/mach-omap2/omap_hwmod.c
> @@ -791,9 +791,11 @@ static int _count_ocp_if_addr_spaces(struct omap_hwmod_ocp_if *os)
> if (!os || !os->addr)
> return 0;
>
> - do {
> - mem =&os->addr[i++];
> - } while (mem->pa_start != mem->pa_end);
> + mem =&os->addr[i];
> +
> + while (mem->pa_start != mem->pa_end) {
> + mem =&os->addr[++i];
> + };
>
> return i;
Cannot you just do "return i - 1"?
Regards,
Benoit
next prev parent reply other threads:[~2011-09-08 7:48 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-08 5:21 [PATCH 0/8] OMAP3/4: Misc fixes and clean-up Santosh Shilimkar
2011-09-08 5:22 ` [PATCH 1/8] OMAP: hwmod: Fix the addr spaces count API Santosh Shilimkar
2011-09-08 7:47 ` Cousson, Benoit [this message]
2011-09-08 5:22 ` [PATCH 2/8] OMAP: Improve register access in L3 Error handler Santosh Shilimkar
2011-09-08 5:22 ` [PATCH 3/8] OMAP: Fix a BUG in l3 error handler Santosh Shilimkar
2011-09-08 5:22 ` [PATCH 4/8] OMAP: Fix indentation issues " Santosh Shilimkar
2011-09-08 5:22 ` [PATCH 5/8] OMAP: Fix sparse warnings " Santosh Shilimkar
2011-09-08 5:22 ` [PATCH 6/8] OMAP: Print Initiator name for l3 custom error Santosh Shilimkar
2011-09-08 5:22 ` [PATCH 7/8] OMAP4: clock: Add CPU local timer clock node Santosh Shilimkar
2011-09-29 19:12 ` Paul Walmsley
2011-09-30 9:14 ` Shilimkar, Santosh
2011-09-29 21:30 ` Linus Walleij
2011-09-30 9:15 ` Shilimkar, Santosh
2011-12-08 23:02 ` Turquette, Mike
2011-12-12 8:15 ` Shilimkar, Santosh
2011-09-08 5:22 ` [PATCH 8/8] OMAP4: Fix the emif and dmm virtual mapping Santosh Shilimkar
2011-09-16 17:56 ` Kevin Hilman
2011-09-20 15:01 ` Santosh Shilimkar
2011-09-21 15:28 ` Santosh Shilimkar
2011-09-21 17:31 ` Kevin Hilman
2011-09-22 5:53 ` Shilimkar, Santosh
2011-09-24 6:03 ` [PATCH 0/8] OMAP3/4: Misc fixes and clean-up Santosh Shilimkar
2011-09-24 6:31 ` Paul Walmsley
2011-09-24 6:35 ` Santosh Shilimkar
2011-09-24 7:36 ` Paul Walmsley
2011-09-24 7:46 ` Santosh Shilimkar
[not found] <f44b67c9efd46d2e7d078da4d3acd30c@mail.gmail.com>
2011-09-08 9:15 ` [PATCH 1/8] OMAP: hwmod: Fix the addr spaces count API Sricharan R
2011-09-08 9:32 ` Santosh
2011-09-08 13:03 ` Sricharan R
2011-09-08 15:06 ` Cousson, Benoit
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=4E68732B.60209@ti.com \
--to=b-cousson@ti.com \
--cc=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=r.sricharan@ti.com \
--cc=santosh.shilimkar@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox