Hi Chen, [auto build test WARNING on linus/master] [also build test WARNING on v4.8-rc3 next-20160825] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] [Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on] [Check https://git-scm.com/docs/git-format-patch for more information] url: https://github.com/0day-ci/linux/commits/chengang-emindsoft-com-cn/arch-all-include-asm-bitops-Use-bool-instead-of-int-for-all-bit-test-functions/20160828-134633 config: m68k-sun3_defconfig (attached as .config) compiler: m68k-linux-gcc (GCC) 4.9.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=m68k All warnings (new ones prefixed by >>): In file included from include/linux/bitops.h:36:0, from include/linux/kernel.h:10, from include/linux/list.h:8, from include/linux/module.h:9, from fs/lockd/clntlock.c:9: include/linux/sunrpc/xprt.h: In function 'xprt_set_bound': >> arch/m68k/include/asm/bitops.h:200:43: warning: value computed is not used [-Wunused-value] bset_mem_test_and_set_bit(nr, vaddr) : \ ^ >> include/linux/sunrpc/xprt.h:433:2: note: in expansion of macro 'test_and_set_bit' test_and_set_bit(XPRT_BOUND, &xprt->state); ^ -- In file included from include/linux/bitops.h:36:0, from include/linux/kernel.h:10, from include/linux/list.h:8, from include/linux/module.h:9, from lib/lru_cache.c:26: lib/lru_cache.c: In function '__lc_get': >> arch/m68k/include/asm/bitops.h:200:43: warning: value computed is not used [-Wunused-value] bset_mem_test_and_set_bit(nr, vaddr) : \ ^ >> lib/lru_cache.c:417:2: note: in expansion of macro 'test_and_set_bit' test_and_set_bit(__LC_DIRTY, &lc->flags); ^ -- In file included from include/linux/bitops.h:36:0, from include/linux/kernel.h:10, from include/linux/list.h:8, from include/linux/module.h:9, from net/sunrpc/auth_gss/auth_gss.c:39: include/linux/sunrpc/xprt.h: In function 'xprt_set_bound': >> arch/m68k/include/asm/bitops.h:200:43: warning: value computed is not used [-Wunused-value] bset_mem_test_and_set_bit(nr, vaddr) : \ ^ >> include/linux/sunrpc/xprt.h:433:2: note: in expansion of macro 'test_and_set_bit' test_and_set_bit(XPRT_BOUND, &xprt->state); ^ net/sunrpc/auth_gss/auth_gss.c: In function 'gss_match': arch/m68k/include/asm/bitops.h:250:45: warning: value computed is not used [-Wunused-value] bclr_mem_test_and_clear_bit(nr, vaddr) : \ ^ >> net/sunrpc/auth_gss/auth_gss.c:1469:3: note: in expansion of macro 'test_and_clear_bit' test_and_clear_bit(RPC_CRED_NOTIFY_TIMEOUT, &acred->ac_flags); ^ vim +200 arch/m68k/include/asm/bitops.h 171d809d Greg Ungerer 2011-05-17 184 { 171d809d Greg Ungerer 2011-05-17 185 char retval; 171d809d Greg Ungerer 2011-05-17 186 171d809d Greg Ungerer 2011-05-17 187 __asm__ __volatile__ ("bfset %2{%1:#1}; sne %0" 171d809d Greg Ungerer 2011-05-17 188 : "=d" (retval) 171d809d Greg Ungerer 2011-05-17 189 : "d" (nr ^ 31), "o" (*vaddr) 171d809d Greg Ungerer 2011-05-17 190 : "memory"); 171d809d Greg Ungerer 2011-05-17 191 return retval; 171d809d Greg Ungerer 2011-05-17 192 } 171d809d Greg Ungerer 2011-05-17 193 171d809d Greg Ungerer 2011-05-17 194 #if defined(CONFIG_COLDFIRE) 171d809d Greg Ungerer 2011-05-17 195 #define test_and_set_bit(nr, vaddr) bset_reg_test_and_set_bit(nr, vaddr) 171d809d Greg Ungerer 2011-05-17 196 #elif defined(CONFIG_CPU_HAS_NO_BITFIELDS) 171d809d Greg Ungerer 2011-05-17 197 #define test_and_set_bit(nr, vaddr) bset_mem_test_and_set_bit(nr, vaddr) 171d809d Greg Ungerer 2011-05-17 198 #else 171d809d Greg Ungerer 2011-05-17 199 #define test_and_set_bit(nr, vaddr) (__builtin_constant_p(nr) ? \ 171d809d Greg Ungerer 2011-05-17 @200 bset_mem_test_and_set_bit(nr, vaddr) : \ 171d809d Greg Ungerer 2011-05-17 201 bfset_mem_test_and_set_bit(nr, vaddr)) 171d809d Greg Ungerer 2011-05-17 202 #endif 171d809d Greg Ungerer 2011-05-17 203 171d809d Greg Ungerer 2011-05-17 204 #define __test_and_set_bit(nr, vaddr) test_and_set_bit(nr, vaddr) 171d809d Greg Ungerer 2011-05-17 205 171d809d Greg Ungerer 2011-05-17 206 f5fbac0b Chen Gang 2016-08-28 207 static inline bool bclr_reg_test_and_clear_bit(int nr, 171d809d Greg Ungerer 2011-05-17 208 volatile unsigned long *vaddr) :::::: The code at line 200 was first introduced by commit :::::: 171d809df1896c1022f9778cd2788be6c255a7dc m68k: merge mmu and non-mmu bitops.h :::::: TO: Greg Ungerer :::::: CC: Greg Ungerer --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation