irqchip: Add irqchip_init dummy function
Subsystems (2)
PATCH 1/1 irqchip: Add irqchip_init dummy function
We add an empty irqchip_init dummy function for cases in which CONFIG_IRQCHIP is not used. In these cases irqchip.c is not compiled, but a funtion call may still be present in architecture code, that in runtime doesn't get hit.
E.g. this is needed in the arch/arm/mach-shmobile/intc-r8a7740.c interrupt setup code where OF use and non OF us is both handled in one file.
--- include/linux/irqchip.h | 4 ++++ 1 file changed, 4 insertions(+)
include/linux/irqchip.h +4 -0
@@ -11,6 +11,10 @@#ifndef _LINUX_IRQCHIP_H#define _LINUX_IRQCHIP_H +#ifdef CONFIG_IRQCHIP void irqchip_init (void ); +#else +void irqchip_init (void ) {}; +#endif #endif
Signature · 1 line
1.7.9.5
PATCH 1/1 irqchip: Add irqchip_init dummy function
Hello.
Quoted 19 lines · Bastian Hecht
We add an empty
irqchip_initdummy function for cases in whichCONFIG_IRQCHIPis not used. In these casesirqchip.cis not compiled, but a funtion call may still be present in architecture code, that in runtime doesn't get hit.E.g. this is needed in the
arch/arm/mach-shmobile/intc-r8a7740.cinterrupt setup code where OF use and non OF us is both handled in one file.Signed-off-by Bastian Hecht <[email protected]>--- include/linux/irqchip.h | 4 ++++ 1 file changed, 4 insertions(+)include/linux/irqchip.h +0
-0
include/linux/irqchip.h line 17
Quoted 7 lines
include/linux/irqchip.h +3
-0@@ -11,6 +11,10 @@#ifndef _LINUX_IRQCHIP_H#define _LINUX_IRQCHIP_H +#ifdef CONFIG_IRQCHIP void irqchip_init (void ); +#else +void irqchip_init (void ) {};
Semicolon not needed here.
include/linux/irqchip.h line 18
Quoted 1 line
include/linux/irqchip.h +1
-0+#endif
WBR, Sergei
PATCH 1/1 irqchip: Add irqchip_init dummy function
Quoted 6 lines · Sergei Shtylyov
Quoted 6 lines
include/linux/irqchip.h +0
-0@@ -11,6 +11,10 @@#ifndef _LINUX_IRQCHIP_H#define _LINUX_IRQCHIP_H
Quoted 9 lines
include/linux/irqchip.h line 17
Quoted 4 lines
include/linux/irqchip.h +3
-0+#ifdef CONFIG_IRQCHIP void irqchip_init (void ); +#else +void irqchip_init (void ) {};Semicolon not needed here.
Quoted 1 line
include/linux/irqchip.h +1
-0+#endif
More importantly, the function should be marked as "static inline", otherwise you get a link error if this header is included in more than one place.
Arnd
PATCH 1/1 irqchip: Add irqchip_init dummy function
Hello.
Quoted 13 lines · Arnd Bergmann
Quoted 13 lines
include/linux/irqchip.h line 17
Quoted 11 lines
include/linux/irqchip.h +3
-0@@ -11,6 +11,10 @@#ifndef _LINUX_IRQCHIP_H#define _LINUX_IRQCHIP_H +#ifdef CONFIG_IRQCHIP void irqchip_init (void ); +#else +void irqchip_init (void ) {};Semicolon not needed here.
Quoted 3 lines
Quoted 1 line
include/linux/irqchip.h line 18
Quoted 1 line
include/linux/irqchip.h +1
-0+#endif More importantly, the function should be marked as "static inline", otherwise you get a link error if this header is included in more than one place.
Right, I should have noticed that too. :-)
Quoted 1 line
Arnd
WBR, Sergei
PATCH 1/1 irqchip: Add irqchip_init dummy function
Quoted 17 lines · Sergei Shtylyov
Hello.
Quoted 13 lines · Arnd Bergmann
Quoted 13 lines
include/linux/irqchip.h line 17
Quoted 11 lines
include/linux/irqchip.h +3
-0@@ -11,6 +11,10 @@#ifndef _LINUX_IRQCHIP_H#define _LINUX_IRQCHIP_H +#ifdef CONFIG_IRQCHIP void irqchip_init (void ); +#else +void irqchip_init (void ) {};Semicolon not needed here.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
include/linux/irqchip.h line 18
Quoted 1 line
include/linux/irqchip.h +1
-0+#endif More importantly, the function should be marked as "static inline", otherwise you get a link error if this header is included in more than one place.
Right, I should have noticed that too. :-)
Quoted 1 line
Arnd
Thanks, I will queue-up the following in the intc-external-irq branch.
From: Bastian Hecht <[email protected]>
irqchip: Add irqchip_init dummy function
We add an empty irqchip_init dummy function for cases in which CONFIG_IRQCHIP is not used. In these cases irqchip.c is not compiled, but a funtion call may still be present in architecture code, that in runtime doesn't get hit.
E.g. this is needed in the arch/arm/mach-shmobile/intc-r8a7740.c interrupt setup code where OF use and non OF us is both handled in one file.
[horms+renesas at verge.net.au: Make non-CONFIG_IRQCHIP version static inline and remove trailing ';'.]
include/linux/irqchip.h +4 -0
@@ -11,6 +11,10 @@#ifndef _LINUX_IRQCHIP_H#define _LINUX_IRQCHIP_H +#ifdef CONFIG_IRQCHIP void irqchip_init (void ); +#else +static inline void irqchip_init (void ) {} +#endif #endif