]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARM: ixp4xx: mark ixp4xx_irq_setup as __init
authorArnd Bergmann <arnd@arndb.de>
Mon, 17 Jun 2019 12:24:31 +0000 (14:24 +0200)
committerOlof Johansson <olof@lixom.net>
Tue, 18 Jun 2019 10:49:41 +0000 (03:49 -0700)
Kbuild complains about ixp4xx_irq_setup not being __init
itself in some configurations:

WARNING: vmlinux.o(.text+0x85bae4): Section mismatch in reference from the function ixp4xx_irq_setup() to the function .init.text:set_handle_irq()
The function ixp4xx_irq_setup() references
the function __init set_handle_irq().
This is often because ixp4xx_irq_setup lacks a __init
annotation or the annotation of set_handle_irq is wrong.

I suspect it normally gets inlined, so we get no such warning,
but clang makes this obvious when the function is left out
of line.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
drivers/irqchip/irq-ixp4xx.c

index d576809429ac800a13930ac6d7501b900ddc3fdd..6751c35b7e1d7c001acc7cb88234dc34d1eab3df 100644 (file)
@@ -252,10 +252,10 @@ static const struct ixp4xx_irq_chunk ixp4xx_irq_chunks[] = {
  * @fwnode: Corresponding fwnode abstraction for this controller
  * @is_356: if this is an IXP43x, IXP45x or IXP46x SoC variant
  */
-static int ixp4xx_irq_setup(struct ixp4xx_irq *ixi,
-                           void __iomem *irqbase,
-                           struct fwnode_handle *fwnode,
-                           bool is_356)
+static int __init ixp4xx_irq_setup(struct ixp4xx_irq *ixi,
+                                  void __iomem *irqbase,
+                                  struct fwnode_handle *fwnode,
+                                  bool is_356)
 {
        int nr_irqs;