oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [willy-pagecache:folio-flags 15/19] arch/riscv/include/asm/bitops.h:214:51: error: 'nr' undeclared
Date: Fri, 21 Jul 2023 10:34:19 +0800	[thread overview]
Message-ID: <202307211016.woqQJ6MX-lkp@intel.com> (raw)

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

                 reply	other threads:[~2023-07-21  2:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202307211016.woqQJ6MX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=willy@infradead.org \
    /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).