CC: [email protected]
BCC: [email protected]
CC: Linux Memory Management List <[email protected]>
TO: Cheng Xu <[email protected]>
CC: Jason Gunthorpe <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   73d0e32571a0786151eb72634f1a4c5891166176
commit: 5a865a32bf9b449da35956df247b69b78dc55ed1 [947/1853] RDMA/erdma: Add 
driver to kernel build environment
:::::: branch date: 25 hours ago
:::::: commit date: 2 days ago
config: x86_64-allmodconfig 
(https://download.01.org/0day-ci/archive/20220608/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>
Reported-by: Julia Lawall <[email protected]>


cocci warnings: (new ones prefixed by >>)
>> drivers/infiniband/hw/erdma/erdma_cm.c:380:12-13: WARNING opportunity for 
>> min()
   drivers/infiniband/hw/erdma/erdma_cm.c:1007:12-13: WARNING opportunity for 
min()

vim +380 drivers/infiniband/hw/erdma/erdma_cm.c

81c527f04b90f47 Cheng Xu 2022-05-23  345  
81c527f04b90f47 Cheng Xu 2022-05-23  346  static int 
erdma_send_mpareqrep(struct erdma_cep *cep, const void *pdata,
81c527f04b90f47 Cheng Xu 2022-05-23  347                                u8 
pd_len)
81c527f04b90f47 Cheng Xu 2022-05-23  348  {
81c527f04b90f47 Cheng Xu 2022-05-23  349        struct socket *s = cep->sock;
81c527f04b90f47 Cheng Xu 2022-05-23  350        struct mpa_rr *rr = 
&cep->mpa.hdr;
81c527f04b90f47 Cheng Xu 2022-05-23  351        struct kvec iov[3];
81c527f04b90f47 Cheng Xu 2022-05-23  352        struct msghdr msg;
81c527f04b90f47 Cheng Xu 2022-05-23  353        int iovec_num = 0;
81c527f04b90f47 Cheng Xu 2022-05-23  354        int ret;
81c527f04b90f47 Cheng Xu 2022-05-23  355        int mpa_len;
81c527f04b90f47 Cheng Xu 2022-05-23  356  
81c527f04b90f47 Cheng Xu 2022-05-23  357        memset(&msg, 0, sizeof(msg));
81c527f04b90f47 Cheng Xu 2022-05-23  358  
81c527f04b90f47 Cheng Xu 2022-05-23  359        rr->params.pd_len = 
cpu_to_be16(pd_len);
81c527f04b90f47 Cheng Xu 2022-05-23  360  
81c527f04b90f47 Cheng Xu 2022-05-23  361        iov[iovec_num].iov_base = rr;
81c527f04b90f47 Cheng Xu 2022-05-23  362        iov[iovec_num].iov_len = 
sizeof(*rr);
81c527f04b90f47 Cheng Xu 2022-05-23  363        iovec_num++;
81c527f04b90f47 Cheng Xu 2022-05-23  364        mpa_len = sizeof(*rr);
81c527f04b90f47 Cheng Xu 2022-05-23  365  
81c527f04b90f47 Cheng Xu 2022-05-23  366        iov[iovec_num].iov_base = 
&cep->mpa.ext_data;
81c527f04b90f47 Cheng Xu 2022-05-23  367        iov[iovec_num].iov_len = 
sizeof(cep->mpa.ext_data);
81c527f04b90f47 Cheng Xu 2022-05-23  368        iovec_num++;
81c527f04b90f47 Cheng Xu 2022-05-23  369        mpa_len += 
sizeof(cep->mpa.ext_data);
81c527f04b90f47 Cheng Xu 2022-05-23  370  
81c527f04b90f47 Cheng Xu 2022-05-23  371        if (pd_len) {
81c527f04b90f47 Cheng Xu 2022-05-23  372                iov[iovec_num].iov_base 
= (char *)pdata;
81c527f04b90f47 Cheng Xu 2022-05-23  373                iov[iovec_num].iov_len 
= pd_len;
81c527f04b90f47 Cheng Xu 2022-05-23  374                mpa_len += pd_len;
81c527f04b90f47 Cheng Xu 2022-05-23  375                iovec_num++;
81c527f04b90f47 Cheng Xu 2022-05-23  376        }
81c527f04b90f47 Cheng Xu 2022-05-23  377  
81c527f04b90f47 Cheng Xu 2022-05-23  378        ret = kernel_sendmsg(s, &msg, 
iov, iovec_num, mpa_len);
81c527f04b90f47 Cheng Xu 2022-05-23  379  
81c527f04b90f47 Cheng Xu 2022-05-23 @380        return ret < 0 ? ret : 0;
81c527f04b90f47 Cheng Xu 2022-05-23  381  }
81c527f04b90f47 Cheng Xu 2022-05-23  382  

:::::: The code at line 380 was first introduced by commit
:::::: 81c527f04b90f471b42c1ba28a489ce996dad9b2 RDMA/erdma: Add connection 
management (CM) support

:::::: TO: Cheng Xu <[email protected]>
:::::: CC: Jason Gunthorpe <[email protected]>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to