Hi Bernard, I love your patch! Yet something to improve: [auto build test ERROR on rdma/for-next] [also build test ERROR on next-20190221] [cannot apply to v5.0-rc4] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Bernard-Metzler/SIW-Request-for-Comments/20190221-220427 base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next config: i386-allmodconfig (attached as .config) compiler: gcc-8 (Debian 8.2.0-20) 8.2.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): drivers/infiniband/sw/siw/siw_qp.c: In function 'siw_activate_tx': drivers/infiniband/sw/siw/siw_qp.c:1142:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] wqe->sqe.sge[0].laddr = (u64)&wqe->sqe.sge[1]; ^ In file included from arch/x86/include/asm/atomic.h:8, from arch/x86/include/asm/msr.h:67, from arch/x86/include/asm/processor.h:21, from arch/x86/include/asm/archrandom.h:26, from include/linux/random.h:166, from include/linux/net.h:22, from drivers/infiniband/sw/siw/siw_qp.c:42: In function 'siw_cq_notify_now.isra.4', inlined from 'siw_sqe_complete' at drivers/infiniband/sw/siw/siw_qp.c:1269:13: >> arch/x86/include/asm/cmpxchg.h:67:4: error: call to '__xchg_wrong_size' declared with attribute error: Bad argument size for xchg __ ## op ## _wrong_size(); \ ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/include/asm/cmpxchg.h:78:27: note: in expansion of macro '__xchg_op' #define arch_xchg(ptr, v) __xchg_op((ptr), (v), xchg, "") ^~~~~~~~~ include/asm-generic/atomic-instrumented.h:415:2: note: in expansion of macro 'arch_xchg' arch_xchg(__ai_ptr, (new)); \ ^~~~~~~~~ arch/x86/include/asm/barrier.h:65:47: note: in expansion of macro 'xchg' #define __smp_store_mb(var, value) do { (void)xchg(&var, value); } while (0) ^~~~ include/asm-generic/barrier.h:145:35: note: in expansion of macro '__smp_store_mb' #define smp_store_mb(var, value) __smp_store_mb(var, value) ^~~~~~~~~~~~~~ drivers/infiniband/sw/siw/siw_qp.c:1217:3: note: in expansion of macro 'smp_store_mb' smp_store_mb(*cq->notify, SIW_NOTIFY_NOT); ^~~~~~~~~~~~ In function 'siw_cq_notify_now.isra.4', inlined from 'siw_rqe_complete' at drivers/infiniband/sw/siw/siw_qp.c:1324:13: >> arch/x86/include/asm/cmpxchg.h:67:4: error: call to '__xchg_wrong_size' declared with attribute error: Bad argument size for xchg __ ## op ## _wrong_size(); \ ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/include/asm/cmpxchg.h:78:27: note: in expansion of macro '__xchg_op' #define arch_xchg(ptr, v) __xchg_op((ptr), (v), xchg, "") ^~~~~~~~~ include/asm-generic/atomic-instrumented.h:415:2: note: in expansion of macro 'arch_xchg' arch_xchg(__ai_ptr, (new)); \ ^~~~~~~~~ arch/x86/include/asm/barrier.h:65:47: note: in expansion of macro 'xchg' #define __smp_store_mb(var, value) do { (void)xchg(&var, value); } while (0) ^~~~ include/asm-generic/barrier.h:145:35: note: in expansion of macro '__smp_store_mb' #define smp_store_mb(var, value) __smp_store_mb(var, value) ^~~~~~~~~~~~~~ drivers/infiniband/sw/siw/siw_qp.c:1217:3: note: in expansion of macro 'smp_store_mb' smp_store_mb(*cq->notify, SIW_NOTIFY_NOT); ^~~~~~~~~~~~ vim +/__xchg_wrong_size +67 arch/x86/include/asm/cmpxchg.h e9826380 Jeremy Fitzhardinge 2011-08-18 37 e9826380 Jeremy Fitzhardinge 2011-08-18 38 /* 31a8394e Jeremy Fitzhardinge 2011-09-30 39 * An exchange-type operation, which takes a value and a pointer, and 7f5281ae Li Zhong 2013-04-25 40 * returns the old value. e9826380 Jeremy Fitzhardinge 2011-08-18 41 */ 31a8394e Jeremy Fitzhardinge 2011-09-30 42 #define __xchg_op(ptr, arg, op, lock) \ e9826380 Jeremy Fitzhardinge 2011-08-18 43 ({ \ 31a8394e Jeremy Fitzhardinge 2011-09-30 44 __typeof__ (*(ptr)) __ret = (arg); \ 31a8394e Jeremy Fitzhardinge 2011-09-30 45 switch (sizeof(*(ptr))) { \ e9826380 Jeremy Fitzhardinge 2011-08-18 46 case __X86_CASE_B: \ 31a8394e Jeremy Fitzhardinge 2011-09-30 47 asm volatile (lock #op "b %b0, %1\n" \ 2ca052a3 Jeremy Fitzhardinge 2012-04-02 48 : "+q" (__ret), "+m" (*(ptr)) \ 31a8394e Jeremy Fitzhardinge 2011-09-30 49 : : "memory", "cc"); \ e9826380 Jeremy Fitzhardinge 2011-08-18 50 break; \ e9826380 Jeremy Fitzhardinge 2011-08-18 51 case __X86_CASE_W: \ 31a8394e Jeremy Fitzhardinge 2011-09-30 52 asm volatile (lock #op "w %w0, %1\n" \ 31a8394e Jeremy Fitzhardinge 2011-09-30 53 : "+r" (__ret), "+m" (*(ptr)) \ 31a8394e Jeremy Fitzhardinge 2011-09-30 54 : : "memory", "cc"); \ e9826380 Jeremy Fitzhardinge 2011-08-18 55 break; \ e9826380 Jeremy Fitzhardinge 2011-08-18 56 case __X86_CASE_L: \ 31a8394e Jeremy Fitzhardinge 2011-09-30 57 asm volatile (lock #op "l %0, %1\n" \ 31a8394e Jeremy Fitzhardinge 2011-09-30 58 : "+r" (__ret), "+m" (*(ptr)) \ 31a8394e Jeremy Fitzhardinge 2011-09-30 59 : : "memory", "cc"); \ e9826380 Jeremy Fitzhardinge 2011-08-18 60 break; \ e9826380 Jeremy Fitzhardinge 2011-08-18 61 case __X86_CASE_Q: \ 31a8394e Jeremy Fitzhardinge 2011-09-30 62 asm volatile (lock #op "q %q0, %1\n" \ 31a8394e Jeremy Fitzhardinge 2011-09-30 63 : "+r" (__ret), "+m" (*(ptr)) \ 31a8394e Jeremy Fitzhardinge 2011-09-30 64 : : "memory", "cc"); \ e9826380 Jeremy Fitzhardinge 2011-08-18 65 break; \ e9826380 Jeremy Fitzhardinge 2011-08-18 66 default: \ 31a8394e Jeremy Fitzhardinge 2011-09-30 @67 __ ## op ## _wrong_size(); \ e9826380 Jeremy Fitzhardinge 2011-08-18 68 } \ 31a8394e Jeremy Fitzhardinge 2011-09-30 69 __ret; \ e9826380 Jeremy Fitzhardinge 2011-08-18 70 }) e9826380 Jeremy Fitzhardinge 2011-08-18 71 :::::: The code at line 67 was first introduced by commit :::::: 31a8394e069e47dc47f4c29e4213aa943342f19f x86: consolidate xchg and xadd macros :::::: TO: Jeremy Fitzhardinge <jeremy@xxxxxxxx> :::::: CC: Jeremy Fitzhardinge <jeremy@xxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip