[arm-platforms:irq/generic_handle_domain_irq 16/22] kernel/irq/chip.c:501:13: error: static declaration of 'handle_nested_irq' follows non-static declaration

kernel test robot lkp at intel.com
Tue Jul 27 11:09:02 PDT 2021


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/generic_handle_domain_irq
head:   d3126d1af248cba3b70342748d77c2825f37eec2
commit: 56b521c481e166d4c7c488bc59752d96f9723b64 [16/22] genirq: Extract __handle_nested_irq() as a primitive for handle_hested_irq()
config: s390-randconfig-r034-20210727 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c658b472f3e61e1818e1909bf02f3d65470018a5)
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
        # install s390 cross compiling tool for clang build
        # apt-get install binutils-s390x-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=56b521c481e166d4c7c488bc59752d96f9723b64
        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/generic_handle_domain_irq
        git checkout 56b521c481e166d4c7c488bc59752d96f9723b64
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=s390 SHELL=/bin/bash kernel/irq/

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 kernel/irq/chip.c:11:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:75:
   include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
                                                             ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
   #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
                                                        ^
   In file included from kernel/irq/chip.c:11:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:75:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   In file included from kernel/irq/chip.c:11:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:75:
   include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsb(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsw(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsl(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesb(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesw(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesl(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
>> kernel/irq/chip.c:458:6: warning: no previous prototype for function '__handle_nested_irq_desc' [-Wmissing-prototypes]
   void __handle_nested_irq_desc(struct irq_desc *desc)
        ^
   kernel/irq/chip.c:458:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __handle_nested_irq_desc(struct irq_desc *desc)
   ^
   static 
>> kernel/irq/chip.c:501:13: error: static declaration of 'handle_nested_irq' follows non-static declaration
   static void handle_nested_irq(unsigned int irq)
               ^
   include/linux/irq.h:660:13: note: previous declaration is here
   extern void handle_nested_irq(unsigned int irq);
               ^
   13 warnings and 1 error generated.


vim +/handle_nested_irq +501 kernel/irq/chip.c

   449	
   450	/*
   451	 *	__handle_nested_irq_desc - Handle a nested irq from a irq thread
   452	 *	@desc:	the interrupt descriptor
   453	 *
   454	 *	Handle interrupts which are nested into a threaded interrupt
   455	 *	handler. The handler function is called inside the calling
   456	 *	threads context.
   457	 */
 > 458	void __handle_nested_irq_desc(struct irq_desc *desc)
   459	{
   460		struct irqaction *action;
   461		irqreturn_t action_ret;
   462	
   463		might_sleep();
   464	
   465		raw_spin_lock_irq(&desc->lock);
   466	
   467		desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
   468	
   469		action = desc->action;
   470		if (unlikely(!action || irqd_irq_disabled(&desc->irq_data))) {
   471			desc->istate |= IRQS_PENDING;
   472			goto out_unlock;
   473		}
   474	
   475		kstat_incr_irqs_this_cpu(desc);
   476		irqd_set(&desc->irq_data, IRQD_IRQ_INPROGRESS);
   477		raw_spin_unlock_irq(&desc->lock);
   478	
   479		action_ret = IRQ_NONE;
   480		for_each_action_of_desc(desc, action)
   481			action_ret |= action->thread_fn(action->irq, action->dev_id);
   482	
   483		if (!irq_settings_no_debug(desc))
   484			note_interrupt(desc, action_ret);
   485	
   486		raw_spin_lock_irq(&desc->lock);
   487		irqd_clear(&desc->irq_data, IRQD_IRQ_INPROGRESS);
   488	
   489	out_unlock:
   490		raw_spin_unlock_irq(&desc->lock);
   491	}
   492	
   493	/*
   494	 *	handle_nested_irq - Handle a nested irq from a irq thread
   495	 *	@irq:	the interrupt number
   496	 *
   497	 *	Handle interrupts which are nested into a threaded interrupt
   498	 *	handler. The handler function is called inside the calling
   499	 *	threads context.
   500	 */
 > 501	static void handle_nested_irq(unsigned int irq)
   502	{
   503		__handle_nested_irq(irq_to_desc(irq));
   504	}
   505	EXPORT_SYMBOL_GPL(handle_nested_irq);
   506	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 16783 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210728/a1e7ad50/attachment-0001.gz>


More information about the linux-arm-kernel mailing list