[arm-platforms:irq/irq_chip_ro 5/9] drivers/irqchip/irq-versatile-fpga.c:150:39: warning: passing argument 2 of 'irq_set_chip_and_handler' discards 'const' qualifier from pointer target type

kernel test robot lkp at intel.com
Sun Jan 30 20:46:15 PST 2022


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/irq_chip_ro
head:   f63a5ded3ea0cd2c587db00f89d219789fbee683
commit: 2c12b32e6767380c697a9dd8bf032c643228485c [5/9] irqchip/versatile-fpga: Switch to dynamic chip name output
config: arm-integrator_defconfig (https://download.01.org/0day-ci/archive/20220131/202201311206.w5a8z0pV-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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
        # https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=2c12b32e6767380c697a9dd8bf032c643228485c
        git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
        git fetch --no-tags arm-platforms irq/irq_chip_ro
        git checkout 2c12b32e6767380c697a9dd8bf032c643228485c
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/irqchip/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

   drivers/irqchip/irq-versatile-fpga.c: In function 'fpga_irq_print_chip':
   drivers/irqchip/irq-versatile-fpga.c:72:9: error: implicit declaration of function 'seq_printf'; did you mean 'scnprintf'? [-Werror=implicit-function-declaration]
      72 |         seq_printf(p, "%s", f->np->name);
         |         ^~~~~~~~~~
         |         scnprintf
   drivers/irqchip/irq-versatile-fpga.c: In function 'fpga_irqdomain_map':
>> drivers/irqchip/irq-versatile-fpga.c:150:39: warning: passing argument 2 of 'irq_set_chip_and_handler' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     150 |         irq_set_chip_and_handler(irq, &fpga_chip,
         |                                       ^~~~~~~~~~
   In file included from drivers/irqchip/irq-versatile-fpga.c:6:
   include/linux/irq.h:718:80: note: expected 'struct irq_chip *' but argument is of type 'const struct irq_chip *'
     718 | static inline void irq_set_chip_and_handler(unsigned int irq, struct irq_chip *chip,
         |                                                               ~~~~~~~~~~~~~~~~~^~~~
   drivers/irqchip/irq-versatile-fpga.c: In function 'fpga_irq_init':
   drivers/irqchip/irq-versatile-fpga.c:187:30: error: 'irq_start' undeclared (first use in this function); did you mean 'irq_stat'?
     187 |                         if (!irq_start)
         |                              ^~~~~~~~~
         |                              irq_stat
   drivers/irqchip/irq-versatile-fpga.c:187:30: note: each undeclared identifier is reported only once for each function it appears in
   cc1: some warnings being treated as errors


vim +150 drivers/irqchip/irq-versatile-fpga.c

   140	
   141	static int fpga_irqdomain_map(struct irq_domain *d, unsigned int irq,
   142			irq_hw_number_t hwirq)
   143	{
   144		struct fpga_irq_data *f = d->host_data;
   145	
   146		/* Skip invalid IRQs, only register handlers for the real ones */
   147		if (!(f->valid & BIT(hwirq)))
   148			return -EPERM;
   149		irq_set_chip_data(irq, f);
 > 150		irq_set_chip_and_handler(irq, &fpga_chip,
   151					handle_level_irq);
   152		irq_set_probe(irq);
   153		return 0;
   154	}
   155	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



More information about the linux-arm-kernel mailing list