lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 28 Jul 2014 16:16:14 -0500
From:	Felipe Balbi <balbi@...com>
To:	Tony Lindgren <tony@...mide.com>
CC:	Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
	Linux ARM Kernel Mailing List 
	<linux-arm-kernel@...ts.infradead.org>, <bcousson@...libre.com>,
	<linux@....linux.org.uk>, <khilman@...prootsystems.com>,
	<tglx@...utronix.de>, <jason@...edaemon.net>,
	<devicetree@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Felipe Balbi <balbi@...com>
Subject: [PATCH 26/35] arm: omap: irq: remove nr_irqs argument

we can set our global omap_nr_irqs early on
and drop the extra argument to omap_init_irq().

Signed-off-by: Felipe Balbi <balbi@...com>
---
 arch/arm/mach-omap2/irq.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index a405b96..44d9cf4 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -207,8 +207,7 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 				IRQ_NOREQUEST | IRQ_NOPROBE, 0);
 }
 
-static void __init omap_init_irq(u32 base, int nr_irqs,
-				 struct device_node *node)
+static void __init omap_init_irq(u32 base, struct device_node *node)
 {
 	int j, irq_base;
 
@@ -216,15 +215,13 @@ static void __init omap_init_irq(u32 base, int nr_irqs,
 	if (WARN_ON(!omap_irq_base))
 		return;
 
-	omap_nr_irqs = nr_irqs;
-
-	irq_base = irq_alloc_descs(-1, 0, nr_irqs, 0);
+	irq_base = irq_alloc_descs(-1, 0, omap_nr_irqs, 0);
 	if (irq_base < 0) {
 		pr_warn("Couldn't allocate IRQ numbers\n");
 		irq_base = 0;
 	}
 
-	domain = irq_domain_add_legacy(node, nr_irqs, irq_base, 0,
+	domain = irq_domain_add_legacy(node, omap_nr_irqs, irq_base, 0,
 			&irq_domain_simple_ops, NULL);
 
 	omap_irq_soft_reset();
@@ -278,19 +275,22 @@ out:
 
 void __init omap2_init_irq(void)
 {
-	omap_init_irq(OMAP24XX_IC_BASE, 96, NULL);
+	omap_nr_irqs = 96;
+	omap_init_irq(OMAP24XX_IC_BASE, NULL);
 	set_handle_irq(omap_intc_handle_irq);
 }
 
 void __init omap3_init_irq(void)
 {
-	omap_init_irq(OMAP34XX_IC_BASE, 96, NULL);
+	omap_nr_irqs = 96;
+	omap_init_irq(OMAP34XX_IC_BASE, NULL);
 	set_handle_irq(omap_intc_handle_irq);
 }
 
 void __init ti81xx_init_irq(void)
 {
-	omap_init_irq(OMAP34XX_IC_BASE, 128, NULL);
+	omap_nr_irqs = 96;
+	omap_init_irq(OMAP34XX_IC_BASE, NULL);
 	set_handle_irq(omap_intc_handle_irq);
 }
 
@@ -298,7 +298,8 @@ static int __init intc_of_init(struct device_node *node,
 			     struct device_node *parent)
 {
 	struct resource res;
-	u32 nr_irq = 96;
+
+	omap_nr_irqs = 96;
 
 	if (WARN_ON(!node))
 		return -ENODEV;
@@ -309,9 +310,9 @@ static int __init intc_of_init(struct device_node *node,
 	}
 
 	if (of_device_is_compatible(node, "ti,am33xx-intc"))
-		nr_irq = 128;
+		omap_nr_irqs = 128;
 
-	omap_init_irq(res.start, nr_irq, of_node_get(node));
+	omap_init_irq(res.start, of_node_get(node));
 
 	set_handle_irq(omap_intc_handle_irq);
 
-- 
2.0.1.563.g66f467c

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists