[arm-platforms:irq/irqchip-next 41/43] drivers/irqchip/irq-mtk-sysirq.c:236:1: warning: parameter names (without types) in function declaration
Marc Zyngier
maz at kernel.org
Sun Jul 26 06:25:15 EDT 2020
On Sun, 26 Jul 2020 10:18:34 +0100,
kernel test robot <lkp at intel.com> wrote:
>
> [1 <text/plain; us-ascii (7bit)>]
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/irqchip-next
> head: 99e05524bc722c8d3c1ab9c817afcb6829dbded3
> commit: 3ae3022690e6787839dafa8ea3496450248b53e1 [41/43] irqchip/mtk-sysirq: Convert to a platform driver
> config: arm-defconfig (attached as .config)
> compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout 3ae3022690e6787839dafa8ea3496450248b53e1
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp at intel.com>
>
> All error/warnings (new ones prefixed by >>):
>
> In file included from drivers/irqchip/irq-mtk-sysirq.c:8:
> >> include/linux/irqchip.h:40:1: warning: data definition has no type or storage class
> 40 | MODULE_DEVICE_TABLE(of, drv_name##_irqchip_match_table); \
> | ^~~~~~~~~~~~~~~~~~~
> drivers/irqchip/irq-mtk-sysirq.c:236:1: note: in expansion of macro 'IRQCHIP_PLATFORM_DRIVER_END'
> 236 | IRQCHIP_PLATFORM_DRIVER_END(mtk_sysirq)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> include/linux/irqchip.h:40:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int]
> 40 | MODULE_DEVICE_TABLE(of, drv_name##_irqchip_match_table); \
> | ^~~~~~~~~~~~~~~~~~~
> drivers/irqchip/irq-mtk-sysirq.c:236:1: note: in expansion of macro 'IRQCHIP_PLATFORM_DRIVER_END'
> 236 | IRQCHIP_PLATFORM_DRIVER_END(mtk_sysirq)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> drivers/irqchip/irq-mtk-sysirq.c:236:1: warning: parameter names (without types) in function declaration
> cc1: some warnings being treated as errors
Thanks for the heads up.
The patch introducing the new macros fails to include linux/module.h
(arm64 gets away with it by luck, while arm fails to compile).
I'm fixing it with the patch below.
M.
From 691d1b3962ff7d434eefcd991e6e7bd629379625 Mon Sep 17 00:00:00 2001
From: Marc Zyngier <maz at kernel.org>
Date: Sun, 26 Jul 2020 11:12:36 +0100
Subject: [PATCH] irqchip: Fix IRQCHIP_PLATFORM_DRIVER_* compilation by
including module.h
The newly introduced IRQCHIP_PLATFORM_DRIVER_* macros expand into
module-related macros, but do so without including module.h.
Depending on the driver and/or architecture, this happens to work,
or not.
Unconditionnaly include linux/module.h to sort it out.
Fixes: f3b5e608ed6d ("irqchip: Add IRQCHIP_PLATFORM_DRIVER_BEGIN/END and IRQCHIP_MATCH helper macros")
Reported-by: kernel test robot <lkp at intel.com>
Cc: Saravana Kannan <saravanak at google.com>
Signed-off-by: Marc Zyngier <maz at kernel.org>
---
include/linux/irqchip.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h
index 8e754d8b8155..67351aac65ef 100644
--- a/include/linux/irqchip.h
+++ b/include/linux/irqchip.h
@@ -12,6 +12,7 @@
#define _LINUX_IRQCHIP_H
#include <linux/acpi.h>
+#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
--
2.27.0
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list