All of lore.kernel.org
 help / color / mirror / Atom feed
* [willy-pagecache:folio-flags 15/19] arch/riscv/include/asm/bitops.h:214:51: error: 'nr' undeclared
@ 2023-07-21  2:34 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-07-21  2:34 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: oe-kbuild-all

tree:   git://git.infradead.org/users/willy/pagecache folio-flags
head:   35ffa765605bc8156660ed51b97fa97f21d88aba
commit: bcf25031ae39ec676a85a99bf0cacdefde781901 [15/19] bitops: Add change_and_unlock_is_negative_byte()
config: riscv-allnoconfig (https://download.01.org/0day-ci/archive/20230721/202307211016.woqQJ6MX-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230721/202307211016.woqQJ6MX-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307211016.woqQJ6MX-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/ratelimit_types.h:5,
                    from include/linux/printk.h:9,
                    from include/asm-generic/bug.h:22,
                    from arch/riscv/include/asm/bug.h:83,
                    from include/linux/bug.h:5,
                    from include/linux/page-flags.h:10,
                    from kernel/bounds.c:10:
   arch/riscv/include/asm/bitops.h: In function 'change_and_unlock_is_negative_byte':
>> arch/riscv/include/asm/bitops.h:214:51: error: 'nr' undeclared (first use in this function)
     214 |                 : "=r" (res), "+A" (addr[BIT_WORD(nr)])
         |                                                   ^~
   include/linux/bits.h:10:35: note: in definition of macro 'BIT_WORD'
      10 | #define BIT_WORD(nr)            ((nr) / BITS_PER_LONG)
         |                                   ^~
   arch/riscv/include/asm/bitops.h:214:51: note: each undeclared identifier is reported only once for each function it appears in
     214 |                 : "=r" (res), "+A" (addr[BIT_WORD(nr)])
         |                                                   ^~
   include/linux/bits.h:10:35: note: in definition of macro 'BIT_WORD'
      10 | #define BIT_WORD(nr)            ((nr) / BITS_PER_LONG)
         |                                   ^~
   In file included from include/linux/bitops.h:68,
                    from include/linux/log2.h:12,
                    from kernel/bounds.c:13:
>> arch/riscv/include/asm/bitops.h:208:55: warning: parameter 'addr' set but not used [-Wunused-but-set-parameter]
     208 |                 int lock_bit, volatile unsigned long *addr)
         |                               ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
   make[3]: *** [scripts/Makefile.build:116: kernel/bounds.s] Error 1
   make[3]: Target 'prepare' not remade because of errors.
   make[2]: *** [Makefile:1275: prepare0] Error 2
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:234: __sub-make] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:234: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +/nr +214 arch/riscv/include/asm/bitops.h

   206	
   207	static inline bool change_and_unlock_is_negative_byte(int change_bit,
 > 208			int lock_bit, volatile unsigned long *addr)
   209	{
   210		unsigned long res, mask;
   211		mask = (1 << change_bit) | (1 << lock_bit);
   212		__asm__ __volatile__ (
   213			__AMO(xor) ".rl %0, %2, %1"
 > 214			: "=r" (res), "+A" (addr[BIT_WORD(nr)])
   215			: "r" (__NOT(mask))
   216			: "memory");
   217		return (res & BIT(7)) != 0;
   218	}
   219	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-21  2:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-21  2:34 [willy-pagecache:folio-flags 15/19] arch/riscv/include/asm/bitops.h:214:51: error: 'nr' undeclared kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.