All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Jason Cooper <jason@lakedaemon.net>,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
	Linux ARM Kernel Mailing List
	<linux-arm-kernel@lists.infradead.org>,
	Felipe Balbi <balbi@ti.com>
Subject: [PATCH 3/9] irqchip: omap-intc: minor improvement to omap_irq_pending()
Date: Mon, 15 Sep 2014 16:15:03 -0500	[thread overview]
Message-ID: <1410815709-462-4-git-send-email-balbi@ti.com> (raw)
In-Reply-To: <1410815709-462-1-git-send-email-balbi@ti.com>

We already hold the number of Pending registers
in omap_nr_pending. Let's use that instead.

Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/irqchip/irq-omap-intc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
index 1478f1a..2933760 100644
--- a/drivers/irqchip/irq-omap-intc.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -174,11 +174,10 @@ static void __init omap_irq_soft_reset(void)
 
 int omap_irq_pending(void)
 {
-	int irq;
+	int i;
 
-	for (irq = 0; irq < omap_nr_irqs; irq += 32)
-		if (intc_readl(INTC_PENDING_IRQ0 +
-					((irq >> 5) << 5)))
+	for (i = 0; i < omap_nr_pending; i++)
+		if (intc_readl(INTC_PENDING_IRQ0 + (0x20 * i)))
 			return 1;
 	return 0;
 }
-- 
2.0.1.563.g66f467c


WARNING: multiple messages have this Message-ID (diff)
From: balbi@ti.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/9] irqchip: omap-intc: minor improvement to omap_irq_pending()
Date: Mon, 15 Sep 2014 16:15:03 -0500	[thread overview]
Message-ID: <1410815709-462-4-git-send-email-balbi@ti.com> (raw)
In-Reply-To: <1410815709-462-1-git-send-email-balbi@ti.com>

We already hold the number of Pending registers
in omap_nr_pending. Let's use that instead.

Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/irqchip/irq-omap-intc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
index 1478f1a..2933760 100644
--- a/drivers/irqchip/irq-omap-intc.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -174,11 +174,10 @@ static void __init omap_irq_soft_reset(void)
 
 int omap_irq_pending(void)
 {
-	int irq;
+	int i;
 
-	for (irq = 0; irq < omap_nr_irqs; irq += 32)
-		if (intc_readl(INTC_PENDING_IRQ0 +
-					((irq >> 5) << 5)))
+	for (i = 0; i < omap_nr_pending; i++)
+		if (intc_readl(INTC_PENDING_IRQ0 + (0x20 * i)))
 			return 1;
 	return 0;
 }
-- 
2.0.1.563.g66f467c

  parent reply	other threads:[~2014-09-15 21:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-15 21:15 [PATCH 0/9] arm: omap: intc: remaining patches Felipe Balbi
2014-09-15 21:15 ` Felipe Balbi
2014-09-15 21:15 ` [PATCH 1/9] irqchip: add irq-omap-intc.h header Felipe Balbi
2014-09-15 21:15   ` Felipe Balbi
2014-09-15 21:15 ` [PATCH 2/9] arm: omap: irq: move irq.c to drivers/irqchip/ Felipe Balbi
2014-09-15 21:15   ` Felipe Balbi
2014-09-15 21:15 ` Felipe Balbi [this message]
2014-09-15 21:15   ` [PATCH 3/9] irqchip: omap-intc: minor improvement to omap_irq_pending() Felipe Balbi
2014-09-15 21:15 ` [PATCH 4/9] irqchip: omap-intc: comment style cleanup Felipe Balbi
2014-09-15 21:15   ` Felipe Balbi
2014-09-15 21:15 ` [PATCH 5/9] irqchip: omap-intc: remove unnecesary of_address_to_resource() call Felipe Balbi
2014-09-15 21:15   ` Felipe Balbi
2014-09-15 21:15 ` [PATCH 6/9] irqchip: omap-intc: enable IP protection Felipe Balbi
2014-09-15 21:15   ` Felipe Balbi
2014-09-15 21:15 ` [PATCH 7/9] irqchip: omap-intc: enable TURBO idle mode Felipe Balbi
2014-09-15 21:15   ` Felipe Balbi
2014-09-15 21:15 ` [PATCH 8/9] irqchip: omap-intc: correct maximum number or MIR registers Felipe Balbi
2014-09-15 21:15   ` Felipe Balbi
2014-09-15 21:15 ` [PATCH 9/9] irqchip: omap-intc: remove unnecessary comments Felipe Balbi
2014-09-15 21:15   ` Felipe Balbi
2014-09-17 14:54 ` [PATCH 0/9] arm: omap: intc: remaining patches Tony Lindgren
2014-09-17 14:54   ` 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=1410815709-462-4-git-send-email-balbi@ti.com \
    --to=balbi@ti.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.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 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.