Content-Type: multipart/mixed; boundary="===============4663933306316209620==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH for-next] RDMA/core: Assign the name of device when allocating ib_device Date: Tue, 28 Apr 2020 14:29:40 +0800 Message-ID: <202004281415.H8iL0WCN%lkp@intel.com> In-Reply-To: <1587893517-11824-1-git-send-email-liweihang@huawei.com> List-Id: --===============4663933306316209620== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Weihang, I love your patch! Perhaps something to improve: [auto build test WARNING on rdma/for-next] [also build test WARNING on linus/master v5.7-rc3 next-20200424] [if your patch is applied to the wrong git tree, please drop us a note to h= elp improve the system. BTW, we also suggest to use '--base' option to specify = the base tree in git format-patch, please see https://stackoverflow.com/a/37406= 982] url: https://github.com/0day-ci/linux/commits/Weihang-Li/RDMA-core-Assig= n-the-name-of-device-when-allocating-ib_device/20200428-022647 base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-n= ext reproduce: # apt-get install sparse # sparse version: v0.6.1-191-gc51a0382-dirty make ARCH=3Dx86_64 allmodconfig make C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot sparse warnings: (new ones prefixed by >>) >> drivers/infiniband/sw/rdmavt/vt.c:94:15: sparse: sparse: not enough argu= ments for function _ib_alloc_device >> drivers/infiniband/sw/rdmavt/vt.c:94:15: sparse: sparse: cast from unkno= wn type >> drivers/infiniband/sw/rdmavt/vt.c:94:15: sparse: sparse: not enough argu= ments for function _ib_alloc_device >> drivers/infiniband/sw/rdmavt/vt.c:94:15: sparse: sparse: not enough argu= ments for function _ib_alloc_device >> drivers/infiniband/sw/rdmavt/vt.c:636:33: sparse: sparse: too many argum= ents for function ib_register_device -- >> drivers/infiniband/sw/siw/siw_main.c:326:16: sparse: sparse: macro "ib_a= lloc_device" requires 3 arguments, but only 2 given drivers/infiniband/sw/siw/iwarp.h:196:22: sparse: sparse: invalid bitfie= ld specifier for type restricted __be32. drivers/infiniband/sw/siw/iwarp.h:197:22: sparse: sparse: invalid bitfie= ld specifier for type restricted __be32. drivers/infiniband/sw/siw/iwarp.h:198:22: sparse: sparse: invalid bitfie= ld specifier for type restricted __be32. drivers/infiniband/sw/siw/iwarp.h:199:23: sparse: sparse: invalid bitfie= ld specifier for type restricted __be32. drivers/infiniband/sw/siw/iwarp.h:200:23: sparse: sparse: invalid bitfie= ld specifier for type restricted __be32. drivers/infiniband/sw/siw/iwarp.h:201:23: sparse: sparse: invalid bitfie= ld specifier for type restricted __be32. drivers/infiniband/sw/siw/iwarp.h:202:25: sparse: sparse: invalid bitfie= ld specifier for type restricted __be32. >> drivers/infiniband/sw/siw/siw_main.c:70:32: sparse: sparse: too many arg= uments for function ib_register_device drivers/infiniband/sw/siw/siw_main.c:326:16: sparse: sparse: undefined i= dentifier 'ib_alloc_device' vim +94 drivers/infiniband/sw/rdmavt/vt.c 0194621b225348 Dennis Dalessandro 2016-01-06 76 = 90793f7179478d Dennis Dalessandro 2016-02-14 77 /** 90793f7179478d Dennis Dalessandro 2016-02-14 78 * rvt_alloc_device - al= locate rdi 90793f7179478d Dennis Dalessandro 2016-02-14 79 * @size: how big of a s= tructure to allocate 90793f7179478d Dennis Dalessandro 2016-02-14 80 * @nports: number of po= rts to allocate array slots for 90793f7179478d Dennis Dalessandro 2016-02-14 81 * 90793f7179478d Dennis Dalessandro 2016-02-14 82 * Use IB core device al= loc to allocate space for the rdi which is assumed to be 90793f7179478d Dennis Dalessandro 2016-02-14 83 * inside of the ib_devi= ce. Any extra space that drivers require should be 90793f7179478d Dennis Dalessandro 2016-02-14 84 * included in size. 90793f7179478d Dennis Dalessandro 2016-02-14 85 * 90793f7179478d Dennis Dalessandro 2016-02-14 86 * We also allocate a po= rt array based on the number of ports. 90793f7179478d Dennis Dalessandro 2016-02-14 87 * 90793f7179478d Dennis Dalessandro 2016-02-14 88 * Return: pointer to al= located rdi 90793f7179478d Dennis Dalessandro 2016-02-14 89 */ ff6acd69518e0a Dennis Dalessandro 2016-01-22 90 struct rvt_dev_info *rvt= _alloc_device(size_t size, int nports) ff6acd69518e0a Dennis Dalessandro 2016-01-22 91 { 042932f7a32741 Colin Ian King 2018-03-01 92 struct rvt_dev_info *rd= i; ff6acd69518e0a Dennis Dalessandro 2016-01-22 93 = 459cc69fa4c17c Leon Romanovsky 2019-01-30 @94 rdi =3D container_of(_i= b_alloc_device(size), struct rvt_dev_info, ibdev); ff6acd69518e0a Dennis Dalessandro 2016-01-22 95 if (!rdi) ff6acd69518e0a Dennis Dalessandro 2016-01-22 96 return rdi; ff6acd69518e0a Dennis Dalessandro 2016-01-22 97 = ff6acd69518e0a Dennis Dalessandro 2016-01-22 98 rdi->ports =3D kcalloc(= nports, ff6acd69518e0a Dennis Dalessandro 2016-01-22 99 sizeof(struct rv= t_ibport **), ff6acd69518e0a Dennis Dalessandro 2016-01-22 100 GFP_KERNEL); ff6acd69518e0a Dennis Dalessandro 2016-01-22 101 if (!rdi->ports) ff6acd69518e0a Dennis Dalessandro 2016-01-22 102 ib_dealloc_device(&rdi= ->ibdev); ff6acd69518e0a Dennis Dalessandro 2016-01-22 103 = ff6acd69518e0a Dennis Dalessandro 2016-01-22 104 return rdi; ff6acd69518e0a Dennis Dalessandro 2016-01-22 105 } ff6acd69518e0a Dennis Dalessandro 2016-01-22 106 EXPORT_SYMBOL(rvt_alloc_= device); ff6acd69518e0a Dennis Dalessandro 2016-01-22 107 = :::::: The code at line 94 was first introduced by commit :::::: 459cc69fa4c17caf21de596693d8a07170820a58 RDMA: Provide safe ib_alloc= _device() function :::::: TO: Leon Romanovsky :::::: CC: Jason Gunthorpe --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============4663933306316209620==--