lkml.org 
[lkml]   [2020]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip: irq/core] genirq: Add stub for set_handle_irq() when !GENERIC_IRQ_MULTI_HANDLER
The following commit has been merged into the irq/core branch of tip:

Commit-ID: ea0c80d1764449acf2f70fdb25aec33800cd0348
Gitweb: https://git.kernel.org/tip/ea0c80d1764449acf2f70fdb25aec33800cd0348
Author: Zhen Lei <thunder.leizhen@huawei.com>
AuthorDate: Thu, 24 Sep 2020 15:17:49 +08:00
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Fri, 25 Sep 2020 16:33:57 +01:00

genirq: Add stub for set_handle_irq() when !GENERIC_IRQ_MULTI_HANDLER

In order to avoid compilation errors when a driver references set_handle_irq(),
but that the architecture doesn't select GENERIC_IRQ_MULTI_HANDLER,
add a stub function that will just WARN_ON_ONCE() if ever used.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
[maz: commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200924071754.4509-2-thunder.leizhen@huawei.com
---
include/linux/irq.h | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index 1b7f4df..b167bae 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -1252,6 +1252,12 @@ int __init set_handle_irq(void (*handle_irq)(struct pt_regs *));
* top-level IRQ handler.
*/
extern void (*handle_arch_irq)(struct pt_regs *) __ro_after_init;
+#else
+#define set_handle_irq(handle_irq) \
+ do { \
+ (void)handle_irq; \
+ WARN_ON(1); \
+ } while (0)
#endif

#endif /* _LINUX_IRQ_H */
\
 
 \ /
  Last update: 2020-10-11 20:00    [W:0.084 / U:39.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site