All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tapani Utriainen <tapani@technexion.com>
To: linux-omap@vger.kernel.org
Subject: [PATCH] OMAP: irq: loop counter fix in omap_init_irq()
Date: Fri, 22 Jul 2011 11:58:10 +0800	[thread overview]
Message-ID: <20110722115810.34f963ad@myhost> (raw)

From: Tapani Utriainen <tapani@technexion.com>

Fixes bug where variable i was redundantly used for counting two nested loops.

Signed-off-by: Tapani Utriainen <tapani@technexion.com>
--- 
 irq.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -165,8 +165,8 @@ static void __init omap_init_irq(u32 base, int nr_irqs)
 
 		omap_irq_bank_init_one(bank);
 
-		for (i = 0, j = 0; i < bank->nr_irqs; i += 32, j += 0x20)
-			omap_alloc_gc(bank->base_reg + j, i, 32);
+		for (j = 0; j < bank->nr_irqs; j += 32)
+			omap_alloc_gc(bank->base_reg + j, j, 32);
 
 		nr_of_irqs += bank->nr_irqs;
 		nr_banks++;

             reply	other threads:[~2011-07-22  4:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-22  3:58 Tapani Utriainen [this message]
2011-09-28 18:20 ` [PATCH] OMAP: irq: loop counter fix in omap_init_irq() Tony Lindgren

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=20110722115810.34f963ad@myhost \
    --to=tapani@technexion.com \
    --cc=linux-omap@vger.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 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.