All of lore.kernel.org
 help / color / mirror / Atom feed
From: sshtylyov@mvista.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] ARM: pxa: Fix suspend/resume array index miscalculation
Date: Mon, 10 Jan 2011 15:09:35 +0300	[thread overview]
Message-ID: <4D2AF6FF.8050605@ru.mvista.com> (raw)
In-Reply-To: <1294615746-27668-4-git-send-email-marek.vasut@gmail.com>

On 10-01-2011 2:29, Marek Vasut wrote:

> Signed-off-by: Marek Vasut<marek.vasut@gmail.com>
> ---
>   arch/arm/mach-pxa/irq.c |   10 +++++-----
>   1 files changed, 5 insertions(+), 5 deletions(-)

> diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
> index 78f0e0c..81edf97 100644
> --- a/arch/arm/mach-pxa/irq.c
> +++ b/arch/arm/mach-pxa/irq.c
> @@ -194,14 +194,14 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
>
>   #ifdef CONFIG_PM
>   static unsigned long saved_icmr[MAX_INTERNAL_IRQS/32];
> -static unsigned long saved_ipr[MAX_INTERNAL_IRQS];
> +static unsigned long saved_ipr[MAX_INTERNAL_IRQS/32];
>
>   static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
>   {
>   	int i;
>
> -	for (i = 0; i < pxa_internal_irq_nr; i += 32) {
> -		void __iomem *base = irq_base(i);
> +	for (i = 0; i < pxa_internal_irq_nr; i++) {

    Won't the loop condition also have to change?

> +		void __iomem *base = irq_base(i << 5);
>
>   		saved_icmr[i] = __raw_readl(base + ICMR);
>   		__raw_writel(0, base + ICMR);
> @@ -219,8 +219,8 @@ static int pxa_irq_resume(struct sys_device *dev)
>   {
>   	int i;
>
> -	for (i = 0; i < pxa_internal_irq_nr; i += 32) {
> -		void __iomem *base = irq_base(i);
> +	for (i = 0; i < pxa_internal_irq_nr; i++) {

    Same question here...

> +		void __iomem *base = irq_base(i << 5);
>
>   		__raw_writel(saved_icmr[i], base + ICMR);
>   		__raw_writel(0, base + ICLR);

WBR, Sergei

  reply	other threads:[~2011-01-10 12:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-09 23:29 [PATCH 1/5] pxa: Fix warning in zeus.c Marek Vasut
2011-01-09 23:29 ` [PATCH 2/5] pxa: Remove unused variable in clock-pxa3xx.c Marek Vasut
2011-01-10 22:42   ` Eric Miao
2011-01-09 23:29 ` [PATCH 3/5] ARM: pxa: Use cpu_has_ipr() consistently in irq.c Marek Vasut
2011-01-10 22:43   ` Eric Miao
2011-01-09 23:29 ` [PATCH 4/5] ARM: pxa: Fix suspend/resume array index miscalculation Marek Vasut
2011-01-10 12:09   ` Sergei Shtylyov [this message]
2011-01-10 22:49   ` Eric Miao
2011-01-10 23:13     ` Marek Vasut
2011-01-09 23:29 ` [PATCH 5/5] ARM: pxa: Fix recursive call of pxa_(un)mask_low_gpio() Marek Vasut
2011-01-10 12:04   ` Sergei Shtylyov
2011-01-10 22:40 ` [PATCH 1/5] pxa: Fix warning in zeus.c Eric Miao

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=4D2AF6FF.8050605@ru.mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=linux-arm-kernel@lists.infradead.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 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.