提交 b56f2cb7 编写于 作者: V Venkatraman S 提交者: Tony Lindgren

ARM: OMAP2+: fix naming collision of variable nr_irqs

Using nr_irqs as local variable name triggers the sparse warning..
./arch/arm/mach-omap2/irq.c:265:6: warning: symbol 'nr_irqs' shadows an earlier one
./linux/include/linux/irqnr.h:26:12: originally declared here
Signed-off-by: NVenkatraman S <svenkatr@ti.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 d3ada72e
...@@ -261,7 +261,7 @@ int __init omap_intc_of_init(struct device_node *node, ...@@ -261,7 +261,7 @@ int __init omap_intc_of_init(struct device_node *node,
struct device_node *parent) struct device_node *parent)
{ {
struct resource res; struct resource res;
u32 nr_irqs = 96; u32 nr_irq = 96;
if (WARN_ON(!node)) if (WARN_ON(!node))
return -ENODEV; return -ENODEV;
...@@ -271,10 +271,10 @@ int __init omap_intc_of_init(struct device_node *node, ...@@ -271,10 +271,10 @@ int __init omap_intc_of_init(struct device_node *node,
return -EINVAL; return -EINVAL;
} }
if (of_property_read_u32(node, "ti,intc-size", &nr_irqs)) if (of_property_read_u32(node, "ti,intc-size", &nr_irq))
pr_warn("unable to get intc-size, default to %d\n", nr_irqs); pr_warn("unable to get intc-size, default to %d\n", nr_irq);
omap_init_irq(res.start, nr_irqs, of_node_get(node)); omap_init_irq(res.start, nr_irq, of_node_get(node));
return 0; return 0;
} }
......
...@@ -85,7 +85,7 @@ static void omap_prcm_irq_handler(unsigned int irq, struct irq_desc *desc) ...@@ -85,7 +85,7 @@ static void omap_prcm_irq_handler(unsigned int irq, struct irq_desc *desc)
unsigned long priority_pending[OMAP_PRCM_MAX_NR_PENDING_REG]; unsigned long priority_pending[OMAP_PRCM_MAX_NR_PENDING_REG];
struct irq_chip *chip = irq_desc_get_chip(desc); struct irq_chip *chip = irq_desc_get_chip(desc);
unsigned int virtirq; unsigned int virtirq;
int nr_irqs = prcm_irq_setup->nr_regs * 32; int nr_irq = prcm_irq_setup->nr_regs * 32;
/* /*
* If we are suspended, mask all interrupts from PRCM level, * If we are suspended, mask all interrupts from PRCM level,
...@@ -110,7 +110,7 @@ static void omap_prcm_irq_handler(unsigned int irq, struct irq_desc *desc) ...@@ -110,7 +110,7 @@ static void omap_prcm_irq_handler(unsigned int irq, struct irq_desc *desc)
prcm_irq_setup->read_pending_irqs(pending); prcm_irq_setup->read_pending_irqs(pending);
/* No bit set, then all IRQs are handled */ /* No bit set, then all IRQs are handled */
if (find_first_bit(pending, nr_irqs) >= nr_irqs) if (find_first_bit(pending, nr_irq) >= nr_irq)
break; break;
omap_prcm_events_filter_priority(pending, priority_pending); omap_prcm_events_filter_priority(pending, priority_pending);
...@@ -121,11 +121,11 @@ static void omap_prcm_irq_handler(unsigned int irq, struct irq_desc *desc) ...@@ -121,11 +121,11 @@ static void omap_prcm_irq_handler(unsigned int irq, struct irq_desc *desc)
*/ */
/* Serve priority events first */ /* Serve priority events first */
for_each_set_bit(virtirq, priority_pending, nr_irqs) for_each_set_bit(virtirq, priority_pending, nr_irq)
generic_handle_irq(prcm_irq_setup->base_irq + virtirq); generic_handle_irq(prcm_irq_setup->base_irq + virtirq);
/* Serve normal events next */ /* Serve normal events next */
for_each_set_bit(virtirq, pending, nr_irqs) for_each_set_bit(virtirq, pending, nr_irq)
generic_handle_irq(prcm_irq_setup->base_irq + virtirq); generic_handle_irq(prcm_irq_setup->base_irq + virtirq);
} }
if (chip->irq_ack) if (chip->irq_ack)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册