Re: genirq, i2c: Provide and use generic_dispatch_irq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Thomas,

I love your patch! Perhaps something to improve:

[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on tip/irq/core linux/master linus/master v5.10-rc6 next-20201204]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Thomas-Gleixner/genirq-i2c-Provide-and-use-generic_dispatch_irq/20201206-023308
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: nds32-randconfig-r016-20201206 (attached as .config)
compiler: nds32le-linux-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
        # https://github.com/0day-ci/linux/commit/79d4e8b739f9018dc2d95a25baf1199fbcf1fb03
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Thomas-Gleixner/genirq-i2c-Provide-and-use-generic_dispatch_irq/20201206-023308
        git checkout 79d4e8b739f9018dc2d95a25baf1199fbcf1fb03
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   In file included from include/linux/spinlock.h:50,
                    from include/linux/irq.h:14,
                    from kernel/irq/irqdesc.c:10:
   kernel/irq/irqdesc.c: In function 'generic_dispatch_irq':
>> include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast
      12 |  (void)(&__dummy == &__dummy2); \
         |                  ^~
   include/linux/irqflags.h:159:3: note: in expansion of macro 'typecheck'
     159 |   typecheck(unsigned long, flags); \
         |   ^~~~~~~~~
   include/linux/irqflags.h:225:36: note: in expansion of macro 'raw_local_irq_save'
     225 | #define local_irq_save(flags) do { raw_local_irq_save(flags); } while (0)
         |                                    ^~~~~~~~~~~~~~~~~~
   kernel/irq/irqdesc.c:669:2: note: in expansion of macro 'local_irq_save'
     669 |  local_irq_save(&flags);
         |  ^~~~~~~~~~~~~~
   In file included from include/asm-generic/bitops.h:14,
                    from ./arch/nds32/include/generated/asm/bitops.h:1,
                    from include/linux/bitops.h:29,
                    from include/linux/kernel.h:12,
                    from include/linux/list.h:9,
                    from include/linux/preempt.h:11,
                    from include/linux/spinlock.h:51,
                    from include/linux/irq.h:14,
                    from kernel/irq/irqdesc.c:10:
   include/linux/irqflags.h:160:9: error: lvalue required as left operand of assignment
     160 |   flags = arch_local_irq_save();  \
         |         ^
   include/linux/irqflags.h:225:36: note: in expansion of macro 'raw_local_irq_save'
     225 | #define local_irq_save(flags) do { raw_local_irq_save(flags); } while (0)
         |                                    ^~~~~~~~~~~~~~~~~~
   kernel/irq/irqdesc.c:669:2: note: in expansion of macro 'local_irq_save'
     669 |  local_irq_save(&flags);
         |  ^~~~~~~~~~~~~~
   In file included from include/linux/spinlock.h:50,
                    from include/linux/irq.h:14,
                    from kernel/irq/irqdesc.c:10:
>> include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast
      12 |  (void)(&__dummy == &__dummy2); \
         |                  ^~
   include/linux/irqflags.h:164:3: note: in expansion of macro 'typecheck'
     164 |   typecheck(unsigned long, flags); \
         |   ^~~~~~~~~
   include/linux/irqflags.h:226:39: note: in expansion of macro 'raw_local_irq_restore'
     226 | #define local_irq_restore(flags) do { raw_local_irq_restore(flags); } while (0)
         |                                       ^~~~~~~~~~~~~~~~~~~~~
   kernel/irq/irqdesc.c:671:2: note: in expansion of macro 'local_irq_restore'
     671 |  local_irq_restore(&flags);
         |  ^~~~~~~~~~~~~~~~~
   In file included from include/asm-generic/bitops.h:14,
                    from ./arch/nds32/include/generated/asm/bitops.h:1,
                    from include/linux/bitops.h:29,
                    from include/linux/kernel.h:12,
                    from include/linux/list.h:9,
                    from include/linux/preempt.h:11,
                    from include/linux/spinlock.h:51,
                    from include/linux/irq.h:14,
                    from kernel/irq/irqdesc.c:10:
>> kernel/irq/irqdesc.c:671:20: warning: passing argument 1 of 'arch_local_irq_restore' makes integer from pointer without a cast [-Wint-conversion]
     671 |  local_irq_restore(&flags);
         |                    ^~~~~~
         |                    |
         |                    long unsigned int *
   include/linux/irqflags.h:165:26: note: in definition of macro 'raw_local_irq_restore'
     165 |   arch_local_irq_restore(flags);  \
         |                          ^~~~~
   kernel/irq/irqdesc.c:671:2: note: in expansion of macro 'local_irq_restore'
     671 |  local_irq_restore(&flags);
         |  ^~~~~~~~~~~~~~~~~
   In file included from include/linux/irqflags.h:16,
                    from include/asm-generic/bitops.h:14,
                    from ./arch/nds32/include/generated/asm/bitops.h:1,
                    from include/linux/bitops.h:29,
                    from include/linux/kernel.h:12,
                    from include/linux/list.h:9,
                    from include/linux/preempt.h:11,
                    from include/linux/spinlock.h:51,
                    from include/linux/irq.h:14,
                    from kernel/irq/irqdesc.c:10:
   arch/nds32/include/asm/irqflags.h:27:57: note: expected 'long unsigned int' but argument is of type 'long unsigned int *'
      27 | static inline void arch_local_irq_restore(unsigned long flags)
         |                                           ~~~~~~~~~~~~~~^~~~~

vim +/arch_local_irq_restore +671 kernel/irq/irqdesc.c

   654	
   655	/**
   656	 * generic_dispatch_irq - Dispatch an interrupt from an interrupt handler
   657	 * @irq:	The irq number to handle
   658	 *
   659	 * A wrapper around generic_handle_irq() which ensures that interrupts are
   660	 * disabled when the primary handler of the dispatched irq is invoked.
   661	 * This is useful for interrupt handlers with dispatching to be safe for
   662	 * the forced threaded case.
   663	 */
   664	int generic_dispatch_irq(unsigned int irq)
   665	{
   666		unsigned long flags;
   667		int ret;
   668	
   669		local_irq_save(&flags);
   670		ret = generic_handle_irq(irq);
 > 671		local_irq_restore(&flags);
   672		return ret;
   673	}
   674	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux