On Thursday, August 08/09/18, 2018 at 00:18:59 +0530, Dan Carpenter wrote: > Hello Potnuri Bharat Teja, > > The patch 94245f4ad9e1: "iw_cxgb4: Support FW write completion WR" > from Aug 2, 2018, leads to the following static checker warning: > > drivers/infiniband/hw/cxgb4/qp.c:651 build_rdma_write_cmpl() > error: uninitialized symbol 'plen'. > > drivers/infiniband/hw/cxgb4/qp.c > 636 wcwr->r3 = 0; > 637 > 638 /* SEND_INV SGL */ > 639 if (wr->next->send_flags & IB_SEND_INLINE) > 640 build_immd_cmpl(sq, &wcwr->u_cmpl.immd_src, wr->next); > 641 else > 642 build_isgl((__be64 *)sq->queue, (__be64 *)&sq->queue[sq->size], > 643 &wcwr->u_cmpl.isgl_src, wr->next->sg_list, 1, NULL); > 644 > 645 /* WRITE SGL */ > 646 build_isgl((__be64 *)sq->queue, (__be64 *)&sq->queue[sq->size], > 647 wcwr->u.isgl_src, wr->sg_list, wr->num_sge, &plen); > ^^^^^ > Smatch thinks build_isgl() can return -EMSGSIZE > > 648 > 649 size = sizeof(*wcwr) + sizeof(struct fw_ri_isgl) + > 650 wr->num_sge * sizeof(struct fw_ri_sge); > 651 wcwr->plen = cpu_to_be32(plen); > 652 *len16 = DIV_ROUND_UP(size, 16); > Thanks Dan, I will send a patch to resolve the warnings. It would be nice if there is some way to test the patches for these warnings before sending patch upstream. Probably some travis kind of checks that can be configured through github. Thanks, Bharat. > regards, > dan carpenter