Subject: Re: [PATCH bpf-next v1 1/1] bpf: Annotate rqspinlock lock acquiring functions with __must_check

From: kernel test robot <[email-masked]>
Date: Tue, 18 Nov 2025 18:11:58 +0800

Hi Amery,

kernel test robot noticed the following build warnings:

[auto build test WARNING on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Amery-Hung/bpf-Annotate-rqspinlock-lock-acquiring-functions-with-__must_check/20251118-031838
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/20251117191515.2934026-1-ameryhung%40gmail.com
patch subject: [PATCH bpf-next v1 1/1] bpf: Annotate rqspinlock lock acquiring functions with __must_check
config: arm-randconfig-002-20251118 (https://download.01.org/0day-ci/archive/20251118/[email-masked]/config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251118/[email-masked]/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 <[email-masked]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email-masked]/

All warnings (new ones prefixed by >>):

   In file included from ./arch/arm/include/generated/asm/rqspinlock.h:1,
                    from kernel/locking/locktorture.c:367:
   kernel/locking/locktorture.c: In function 'torture_raw_res_spin_write_lock_irq':
>> include/asm-generic/rqspinlock.h:255:48: warning: ignoring return value of '__raw_res_spin_lock_irqsave' declared with attribute 'warn_unused_result' [-Wunused-result]
     255 | #define raw_res_spin_lock_irqsave(lock, flags) __raw_res_spin_lock_irqsave(lock, &flags)
         |                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/locktorture.c:396:2: note: in expansion of macro 'raw_res_spin_lock_irqsave'
     396 |  raw_res_spin_lock_irqsave(&rqspinlock, flags);
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/locktorture.c: In function 'torture_raw_res_spin_write_lock':
>> kernel/locking/locktorture.c:372:2: warning: ignoring return value of 'raw_res_spin_lock' declared with attribute 'warn_unused_result' [-Wunused-result]
     372 |  raw_res_spin_lock(&rqspinlock);
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   In file included from arch/arm/include/generated/asm/rqspinlock.h:1,
                    from locktorture.c:367:
   locktorture.c: In function 'torture_raw_res_spin_write_lock_irq':
>> include/asm-generic/rqspinlock.h:255:48: warning: ignoring return value of '__raw_res_spin_lock_irqsave' declared with attribute 'warn_unused_result' [-Wunused-result]
     255 | #define raw_res_spin_lock_irqsave(lock, flags) __raw_res_spin_lock_irqsave(lock, &flags)
         |                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   locktorture.c:396:2: note: in expansion of macro 'raw_res_spin_lock_irqsave'
     396 |  raw_res_spin_lock_irqsave(&rqspinlock, flags);
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~
   locktorture.c: In function 'torture_raw_res_spin_write_lock':
   locktorture.c:372:2: warning: ignoring return value of 'raw_res_spin_lock' declared with attribute 'warn_unused_result' [-Wunused-result]
     372 |  raw_res_spin_lock(&rqspinlock);
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +255 include/asm-generic/rqspinlock.h

   254	
 > 255	#define raw_res_spin_lock_irqsave(lock, flags) __raw_res_spin_lock_irqsave(lock, &flags)
   256	

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