linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: kernel test robot <lkp@intel.com>,
	Saravana Kannan <saravanak@google.com>
Cc: kernel-team@android.com, Hanks Chen <hanks.chen@mediatek.com>,
	kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [arm-platforms:irq/irqchip-next 41/43] drivers/irqchip/irq-mtk-sysirq.c:236:1: warning: parameter names (without types) in function declaration
Date: Sun, 26 Jul 2020 11:25:15 +0100	[thread overview]
Message-ID: <87wo2qwp2s.wl-maz@kernel.org> (raw)
In-Reply-To: <202007261731.5H1vb9oj%lkp@intel.com>

On Sun, 26 Jul 2020 10:18:34 +0100,
kernel test robot <lkp@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@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@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@intel.com>
Cc: Saravana Kannan <saravanak@google.com>
Signed-off-by: Marc Zyngier <maz@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.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-07-26 10:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-26  9:18 [arm-platforms:irq/irqchip-next 41/43] drivers/irqchip/irq-mtk-sysirq.c:236:1: warning: parameter names (without types) in function declaration kernel test robot
2020-07-26 10:25 ` Marc Zyngier [this message]
2020-07-27 22:34   ` Saravana Kannan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wo2qwp2s.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=hanks.chen@mediatek.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kernel-team@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lkp@intel.com \
    --cc=saravanak@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).