All of lore.kernel.org
 help / color / mirror / Atom feed
* [norov:find_and_bit 14/34] include/linux/find.h:859:9: warning: statement with no effect
@ 2023-11-26 23:32 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-11-26 23:32 UTC (permalink / raw)
  To: Yury Norov; +Cc: oe-kbuild-all

tree:   https://github.com/norov/linux find_and_bit
head:   0509c68d320cff2284c7fc39d37051e465c429ec
commit: 82d8aa9f9c50fa8c7049ba295a413770eefb41c1 [14/34] scsi: core: XXXX use atomic find_bit() API where appropriate
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20231127/202311270643.5nYR7aHv-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231127/202311270643.5nYR7aHv-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/202311270643.5nYR7aHv-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from include/linux/bitmap.h:10,
                    from include/linux/cpumask.h:12,
                    from arch/x86/include/asm/cpumask.h:5,
                    from arch/x86/include/asm/msr.h:11,
                    from arch/x86/include/asm/processor.h:23,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:60,
                    from arch/x86/include/asm/preempt.h:9,
                    from include/linux/preempt.h:79,
                    from include/linux/spinlock.h:56,
                    from include/linux/wait.h:9,
                    from include/linux/mempool.h:8,
                    from include/linux/bio.h:8,
                    from drivers/scsi/scsi_lib.c:12:
   drivers/scsi/scsi_lib.c: In function 'scsi_evt_thread':
>> include/linux/find.h:859:9: warning: statement with no effect [-Wunused-value]
     859 |         for ((bit); \
         |         ^~~
   drivers/scsi/scsi_lib.c:2502:9: note: in expansion of macro 'for_each_test_and_clear_bit_from'
    2502 |         for_each_test_and_clear_bit_from(evt_type, sdev->pending_events, SDEV_EVT_LAST + 1)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +859 include/linux/find.h

6b8ecb84f8f640 include/asm-generic/bitops/find.h Yury Norov         2021-08-14  828  
bc9d6635c293a2 include/linux/find.h              Yury Norov         2021-08-14  829  #define for_each_set_bit(bit, addr, size) \
fdae96a3fc7f70 include/linux/find.h              Yury Norov         2022-09-19  830  	for ((bit) = 0; (bit) = find_next_bit((addr), (size), (bit)), (bit) < (size); (bit)++)
bc9d6635c293a2 include/linux/find.h              Yury Norov         2021-08-14  831  
33e67710beda78 include/linux/find.h              Yury Norov         2022-09-19  832  #define for_each_and_bit(bit, addr1, addr2, size) \
fdae96a3fc7f70 include/linux/find.h              Yury Norov         2022-09-19  833  	for ((bit) = 0;									\
fdae96a3fc7f70 include/linux/find.h              Yury Norov         2022-09-19  834  	     (bit) = find_next_and_bit((addr1), (addr2), (size), (bit)), (bit) < (size);\
fdae96a3fc7f70 include/linux/find.h              Yury Norov         2022-09-19  835  	     (bit)++)
33e67710beda78 include/linux/find.h              Yury Norov         2022-09-19  836  
5f75ff295c662c include/linux/find.h              Valentin Schneider 2022-10-03  837  #define for_each_andnot_bit(bit, addr1, addr2, size) \
5f75ff295c662c include/linux/find.h              Valentin Schneider 2022-10-03  838  	for ((bit) = 0;									\
5f75ff295c662c include/linux/find.h              Valentin Schneider 2022-10-03  839  	     (bit) = find_next_andnot_bit((addr1), (addr2), (size), (bit)), (bit) < (size);\
5f75ff295c662c include/linux/find.h              Valentin Schneider 2022-10-03  840  	     (bit)++)
5f75ff295c662c include/linux/find.h              Valentin Schneider 2022-10-03  841  
1470afefc3c42d include/linux/find.h              Dave Chinner       2023-03-15  842  #define for_each_or_bit(bit, addr1, addr2, size) \
1470afefc3c42d include/linux/find.h              Dave Chinner       2023-03-15  843  	for ((bit) = 0;									\
1470afefc3c42d include/linux/find.h              Dave Chinner       2023-03-15  844  	     (bit) = find_next_or_bit((addr1), (addr2), (size), (bit)), (bit) < (size);\
1470afefc3c42d include/linux/find.h              Dave Chinner       2023-03-15  845  	     (bit)++)
1470afefc3c42d include/linux/find.h              Dave Chinner       2023-03-15  846  
bc9d6635c293a2 include/linux/find.h              Yury Norov         2021-08-14  847  /* same as for_each_set_bit() but use bit as value to start with */
bc9d6635c293a2 include/linux/find.h              Yury Norov         2021-08-14  848  #define for_each_set_bit_from(bit, addr, size) \
fdae96a3fc7f70 include/linux/find.h              Yury Norov         2022-09-19  849  	for (; (bit) = find_next_bit((addr), (size), (bit)), (bit) < (size); (bit)++)
bc9d6635c293a2 include/linux/find.h              Yury Norov         2021-08-14  850  
190bed278d94d3 include/linux/find.h              Yury Norov         2023-11-18  851  /* same as for_each_set_bit() but atomically clears each found bit */
190bed278d94d3 include/linux/find.h              Yury Norov         2023-11-18  852  #define for_each_test_and_clear_bit(bit, addr, size) \
190bed278d94d3 include/linux/find.h              Yury Norov         2023-11-18  853  	for ((bit) = 0; \
190bed278d94d3 include/linux/find.h              Yury Norov         2023-11-18  854  	     (bit) = find_and_clear_next_bit((addr), (size), (bit)), (bit) < (size); \
190bed278d94d3 include/linux/find.h              Yury Norov         2023-11-18  855  	     (bit)++)
190bed278d94d3 include/linux/find.h              Yury Norov         2023-11-18  856  
190bed278d94d3 include/linux/find.h              Yury Norov         2023-11-18  857  /* same as for_each_set_bit_from() but atomically clears each found bit */
190bed278d94d3 include/linux/find.h              Yury Norov         2023-11-18  858  #define for_each_test_and_clear_bit_from(bit, addr, size) \
190bed278d94d3 include/linux/find.h              Yury Norov         2023-11-18 @859  	for ((bit); \
190bed278d94d3 include/linux/find.h              Yury Norov         2023-11-18  860  	     (bit) = find_and_clear_next_bit((addr), (size), (bit)), (bit) < (size); \
190bed278d94d3 include/linux/find.h              Yury Norov         2023-11-18  861  	     (bit)++)
190bed278d94d3 include/linux/find.h              Yury Norov         2023-11-18  862  

:::::: The code at line 859 was first introduced by commit
:::::: 190bed278d94d37755ff6c1a6096536ff0c72e93 lib/find: add atomic find_bit() primitives

:::::: TO: Yury Norov <yury.norov@gmail.com>
:::::: CC: Yury Norov <yury.norov@gmail.com>

-- 
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-11-26 23:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-26 23:32 [norov:find_and_bit 14/34] include/linux/find.h:859:9: warning: statement with no effect 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.