Re: [PATCH 20/20] fixed checkpatch issues for all files in rxe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bob,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on rdma/for-next]
[also build test ERROR on next-20200814]
[cannot apply to v5.8]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Bob-Pearson/Added-ib_uverbs_wc_opcode-to-ib_user_verbs-h/20200816-090418
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   In file included from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from drivers/infiniband/sw/rxe/rxe.h:17,
                    from drivers/infiniband/sw/rxe/rxe_mw.c:10:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/xtensa/include/asm/page.h:193:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     193 |  ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
         |         ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   arch/xtensa/include/asm/page.h:201:32: note: in expansion of macro 'pfn_valid'
     201 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
         |                                ^~~~~~~~~
   include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   In file included from ./arch/xtensa/include/generated/asm/bug.h:1,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/xtensa/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:13,
                    from drivers/infiniband/sw/rxe/rxe.h:17,
                    from drivers/infiniband/sw/rxe/rxe_mw.c:10:
   include/linux/dma-mapping.h: In function 'dma_map_resource':
   arch/xtensa/include/asm/page.h:193:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     193 |  ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
         |         ^~
   include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
     144 |  int __ret_warn_once = !!(condition);   \
         |                           ^~~~~~~~~
   include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
     352 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |                   ^~~~~~~~~
   drivers/infiniband/sw/rxe/rxe_mw.c: In function 'do_bind_mw':
>> drivers/infiniband/sw/rxe/rxe_mw.c:227:17: error: implicit declaration of function 'rxe_get_key'; did you mean 'rxe_get_av'? [-Werror=implicit-function-declaration]
     227 |  duplicate_mw = rxe_get_key(rxe, &new_key);
         |                 ^~~~~~~~~~~
         |                 rxe_get_av
>> drivers/infiniband/sw/rxe/rxe_mw.c:227:35: error: 'new_key' undeclared (first use in this function); did you mean 'new_rkey'?
     227 |  duplicate_mw = rxe_get_key(rxe, &new_key);
         |                                   ^~~~~~~
         |                                   new_rkey
   drivers/infiniband/sw/rxe/rxe_mw.c:227:35: note: each undeclared identifier is reported only once for each function it appears in
   drivers/infiniband/sw/rxe/rxe_mw.c:211:6: warning: unused variable 'ret' [-Wunused-variable]
     211 |  int ret;
         |      ^~~
   cc1: some warnings being treated as errors

vim +227 drivers/infiniband/sw/rxe/rxe_mw.c

   207	
   208	static int do_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe,
   209				struct rxe_mw *mw, struct rxe_mr *mr)
   210	{
   211		int ret;
   212		u32 rkey;
   213		u32 new_rkey;
   214		struct rxe_mw *duplicate_mw;
   215		struct rxe_dev *rxe = to_rdev(qp->ibqp.device);
   216	
   217		/*
   218		 * key part of new rkey is provided by user for type 2
   219		 * and ibv_bind_mw() for type 1 MWs
   220		 * there is a very rare chance that the new rkey will
   221		 * collide with an existing MW. Return an error if this
   222		 * occurs
   223		 */
   224		rkey = mw->ibmw.rkey;
   225		new_rkey = (rkey & 0xffffff00) | (wqe->wr.wr.umw.rkey & 0x000000ff);
   226	
 > 227		duplicate_mw = rxe_get_key(rxe, &new_key);
   228		if (duplicate_mw) {
   229			pr_err_once("new MW key is a duplicate, try another\n");
   230			rxe_drop_ref(duplicate_mw);
   231			return -EINVAL;
   232		}
   233	
   234		rxe_drop_key(mw);
   235		rxe_add_key(mw, &new_rkey);
   236	
   237		mw->access = wqe->wr.wr.umw.access;
   238		mw->state = RXE_MEM_STATE_VALID;
   239		mw->addr = wqe->wr.wr.umw.addr;
   240		mw->length = wqe->wr.wr.umw.length;
   241	
   242		if (mw->mr) {
   243			rxe_drop_ref(mw->mr);
   244			atomic_dec(&mw->mr->num_mw);
   245			mw->mr = NULL;
   246		}
   247	
   248		if (mw->length) {
   249			mw->mr = mr;
   250			atomic_inc(&mr->num_mw);
   251			rxe_add_ref(mr);
   252		}
   253	
   254		if (mw->ibmw.type == IB_MW_TYPE_2)
   255			mw->qp = qp;
   256	
   257		return 0;
   258	}
   259	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux