Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1403501 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2016-05-19 10:40 +0200 |
| Last post | 2016-05-19 15:30 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] ARM: lpc32xx: fix NR_IRQS confict Arnd Bergmann <arnd@arndb.de> - 2016-05-19 10:40 +0200
Re: [PATCH] ARM: lpc32xx: fix NR_IRQS confict Vladimir Zapolskiy <vz@mleia.com> - 2016-05-19 12:10 +0200
Re: [PATCH] ARM: lpc32xx: fix NR_IRQS confict Sylvain Lemieux <slemieux.tyco@gmail.com> - 2016-05-19 14:10 +0200
Re: [PATCH] ARM: lpc32xx: fix NR_IRQS confict Arnd Bergmann <arnd@arndb.de> - 2016-05-19 15:30 +0200
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-05-19 10:40 +0200 |
| Subject | [PATCH] ARM: lpc32xx: fix NR_IRQS confict |
| Message-ID | <rArES-5LS-11@gated-at.bofh.it> |
With the change to sparse IRQs, the lpc32xx platform gets a warning about
conflicting macros:
In file included from arch/arm/mach-lpc32xx/irq.c:31:0:
arch/arm/mach-lpc32xx/include/mach/irqs.h:115:0: warning: "NR_IRQS" redefined
#define NR_IRQS 96
arch/arm/include/asm/irq.h:9:0: note: this is the location of the previous definition
#define NR_IRQS NR_IRQS_LEGACY
In the irq controller driver, we surely need the local number instead of
the generic NR_IRQS definition, so I'm renaming that one to LPC32XX_NR_IRQS.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 8cb17b5ed017 ("irqchip: Add LPC32xx interrupt controller driver")
---
arch/arm/mach-lpc32xx/include/mach/irqs.h | 2 +-
arch/arm/mach-lpc32xx/irq.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-lpc32xx/include/mach/irqs.h b/arch/arm/mach-lpc32xx/include/mach/irqs.h
index 9e3b90df32e1..00190535df90 100644
--- a/arch/arm/mach-lpc32xx/include/mach/irqs.h
+++ b/arch/arm/mach-lpc32xx/include/mach/irqs.h
@@ -112,6 +112,6 @@
#define IRQ_LPC32XX_GPI_06 LPC32XX_SIC2_IRQ(28)
#define IRQ_LPC32XX_SYSCLK LPC32XX_SIC2_IRQ(31)
-#define NR_IRQS 96
+#define LPC32XX_NR_IRQS 96
#endif
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c
index 2ae431e8bc1b..e30f5e6b8573 100644
--- a/arch/arm/mach-lpc32xx/irq.c
+++ b/arch/arm/mach-lpc32xx/irq.c
@@ -81,7 +81,7 @@ struct lpc32xx_event_info {
/*
* Maps an IRQ number to and event mask and register
*/
-static const struct lpc32xx_event_info lpc32xx_events[NR_IRQS] = {
+static const struct lpc32xx_event_info lpc32xx_events[LPC32XX_NR_IRQS] = {
[IRQ_LPC32XX_GPI_08] = {
.event_group = &lpc32xx_event_pin_regs,
.mask = LPC32XX_CLKPWR_EXTSRC_GPI_08_BIT,
@@ -431,7 +431,7 @@ void __init lpc32xx_init_irq(void)
LPC32XX_INTC_ACT_TYPE(LPC32XX_SIC2_BASE));
/* Configure supported IRQ's */
- for (i = 0; i < NR_IRQS; i++) {
+ for (i = 0; i < LPC32XX_NR_IRQS; i++) {
irq_set_chip_and_handler(i, &lpc32xx_irq_chip,
handle_level_irq);
irq_clear_status_flags(i, IRQ_NOREQUEST);
@@ -465,7 +465,7 @@ void __init lpc32xx_init_irq(void)
of_irq_init(mic_of_match);
- lpc32xx_mic_domain = irq_domain_add_legacy(lpc32xx_mic_np, NR_IRQS,
+ lpc32xx_mic_domain = irq_domain_add_legacy(lpc32xx_mic_np, LPC32XX_NR_IRQS,
0, 0, &irq_domain_simple_ops,
NULL);
if (!lpc32xx_mic_domain)
--
2.7.0
[toc] | [next] | [standalone]
| From | Vladimir Zapolskiy <vz@mleia.com> |
|---|---|
| Date | 2016-05-19 12:10 +0200 |
| Message-ID | <rAt3Y-6L2-15@gated-at.bofh.it> |
| In reply to | #1403501 |
Hi Arnd,
On 19.05.2016 11:35, Arnd Bergmann wrote:
> With the change to sparse IRQs, the lpc32xx platform gets a warning about
> conflicting macros:
>
> In file included from arch/arm/mach-lpc32xx/irq.c:31:0:
> arch/arm/mach-lpc32xx/include/mach/irqs.h:115:0: warning: "NR_IRQS" redefined
> #define NR_IRQS 96
> arch/arm/include/asm/irq.h:9:0: note: this is the location of the previous definition
> #define NR_IRQS NR_IRQS_LEGACY
>
> In the irq controller driver, we surely need the local number instead of
> the generic NR_IRQS definition, so I'm renaming that one to LPC32XX_NR_IRQS.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 8cb17b5ed017 ("irqchip: Add LPC32xx interrupt controller driver")
I think that the entire removal of arch/arm/mach-lpc32xx/irq.c is the proper fix,
since it is a dead code now - http://www.spinics.net/lists/arm-kernel/msg499976.html
I believe you can apply that change and add Fixes: tag.
--
With best wishes,
Vladimir
[toc] | [prev] | [next] | [standalone]
| From | Sylvain Lemieux <slemieux.tyco@gmail.com> |
|---|---|
| Date | 2016-05-19 14:10 +0200 |
| Message-ID | <rAuW7-7Xo-45@gated-at.bofh.it> |
| In reply to | #1403614 |
Hi Arnd,
On Thu, 2016-05-19 at 13:04 +0300, Vladimir Zapolskiy wrote:
> Hi Arnd,
>
> On 19.05.2016 11:35, Arnd Bergmann wrote:
> > With the change to sparse IRQs, the lpc32xx platform gets a warning about
> > conflicting macros:
> >
> > In file included from arch/arm/mach-lpc32xx/irq.c:31:0:
> > arch/arm/mach-lpc32xx/include/mach/irqs.h:115:0: warning: "NR_IRQS" redefined
> > #define NR_IRQS 96
> > arch/arm/include/asm/irq.h:9:0: note: this is the location of the previous definition
> > #define NR_IRQS NR_IRQS_LEGACY
> >
> > In the irq controller driver, we surely need the local number instead of
> > the generic NR_IRQS definition, so I'm renaming that one to LPC32XX_NR_IRQS.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Fixes: 8cb17b5ed017 ("irqchip: Add LPC32xx interrupt controller driver")
>
> I think that the entire removal of arch/arm/mach-lpc32xx/irq.c is the proper fix,
> since it is a dead code now - http://www.spinics.net/lists/arm-kernel/msg499976.html
>
> I believe you can apply that change and add Fixes: tag.
>
I also submitted a patch that remove this warning at the source
(GPIO driver broken to_irq support), until the GPIO driver update is
done.
Please refer to this link:
http://thread.gmane.org/gmane.linux.kernel.gpio/16837
Sylvain
> --
> With best wishes,
> Vladimir
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-05-19 15:30 +0200 |
| Message-ID | <rAwbx-kQ-45@gated-at.bofh.it> |
| In reply to | #1403698 |
On Thursday 19 May 2016 08:09:29 Sylvain Lemieux wrote:
> Hi Arnd,
>
> On Thu, 2016-05-19 at 13:04 +0300, Vladimir Zapolskiy wrote:
> > Hi Arnd,
> >
> > On 19.05.2016 11:35, Arnd Bergmann wrote:
> > > With the change to sparse IRQs, the lpc32xx platform gets a warning about
> > > conflicting macros:
> > >
> > > In file included from arch/arm/mach-lpc32xx/irq.c:31:0:
> > > arch/arm/mach-lpc32xx/include/mach/irqs.h:115:0: warning: "NR_IRQS" redefined
> > > #define NR_IRQS 96
> > > arch/arm/include/asm/irq.h:9:0: note: this is the location of the previous definition
> > > #define NR_IRQS NR_IRQS_LEGACY
> > >
> > > In the irq controller driver, we surely need the local number instead of
> > > the generic NR_IRQS definition, so I'm renaming that one to LPC32XX_NR_IRQS.
> > >
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > Fixes: 8cb17b5ed017 ("irqchip: Add LPC32xx interrupt controller driver")
> >
> > I think that the entire removal of arch/arm/mach-lpc32xx/irq.c is the proper fix,
> > since it is a dead code now - http://www.spinics.net/lists/arm-kernel/msg499976.html
> >
> > I believe you can apply that change and add Fixes: tag.
Ok, I've applied that on the next/late branch for arm-soc now, and one patch
on top that removes the NR_IRQS definition from mach/irqs.h
> I also submitted a patch that remove this warning at the source
> (GPIO driver broken to_irq support), until the GPIO driver update is
> done.
>
> Please refer to this link:
> http://thread.gmane.org/gmane.linux.kernel.gpio/16837
This is in another subsystem, so I'm not applying this to arm-soc, but
the warning should be gone with my one-line change to remove NR_IRQS
anyway.
Linus, if you want to put it in the gpio tree for v4.7, feel free to
add my Acked-by: Arnd Bergmann <arnd@arndb.de>, otherwise I guess it's
enough to have this in v4.8.
Arnd
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web