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 help 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/37406982] url: https://github.com/0day-ci/linux/commits/Weihang-Li/RDMA-core-Assign-the-name-of-device-when-allocating-ib_device/20200428-022647 base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next reproduce: # apt-get install sparse # sparse version: v0.6.1-191-gc51a0382-dirty make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <lkp@xxxxxxxxx> sparse warnings: (new ones prefixed by >>) >> drivers/infiniband/sw/rdmavt/vt.c:94:15: sparse: sparse: not enough arguments for function _ib_alloc_device >> drivers/infiniband/sw/rdmavt/vt.c:94:15: sparse: sparse: cast from unknown type >> drivers/infiniband/sw/rdmavt/vt.c:94:15: sparse: sparse: not enough arguments for function _ib_alloc_device >> drivers/infiniband/sw/rdmavt/vt.c:94:15: sparse: sparse: not enough arguments for function _ib_alloc_device >> drivers/infiniband/sw/rdmavt/vt.c:636:33: sparse: sparse: too many arguments for function ib_register_device -- >> drivers/infiniband/sw/siw/siw_main.c:326:16: sparse: sparse: macro "ib_alloc_device" requires 3 arguments, but only 2 given drivers/infiniband/sw/siw/iwarp.h:196:22: sparse: sparse: invalid bitfield specifier for type restricted __be32. drivers/infiniband/sw/siw/iwarp.h:197:22: sparse: sparse: invalid bitfield specifier for type restricted __be32. drivers/infiniband/sw/siw/iwarp.h:198:22: sparse: sparse: invalid bitfield specifier for type restricted __be32. drivers/infiniband/sw/siw/iwarp.h:199:23: sparse: sparse: invalid bitfield specifier for type restricted __be32. drivers/infiniband/sw/siw/iwarp.h:200:23: sparse: sparse: invalid bitfield specifier for type restricted __be32. drivers/infiniband/sw/siw/iwarp.h:201:23: sparse: sparse: invalid bitfield specifier for type restricted __be32. drivers/infiniband/sw/siw/iwarp.h:202:25: sparse: sparse: invalid bitfield specifier for type restricted __be32. >> drivers/infiniband/sw/siw/siw_main.c:70:32: sparse: sparse: too many arguments for function ib_register_device drivers/infiniband/sw/siw/siw_main.c:326:16: sparse: sparse: undefined identifier '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 - allocate rdi 90793f7179478d Dennis Dalessandro 2016-02-14 79 * @size: how big of a structure to allocate 90793f7179478d Dennis Dalessandro 2016-02-14 80 * @nports: number of ports to allocate array slots for 90793f7179478d Dennis Dalessandro 2016-02-14 81 * 90793f7179478d Dennis Dalessandro 2016-02-14 82 * Use IB core device alloc to allocate space for the rdi which is assumed to be 90793f7179478d Dennis Dalessandro 2016-02-14 83 * inside of the ib_device. 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 port array based on the number of ports. 90793f7179478d Dennis Dalessandro 2016-02-14 87 * 90793f7179478d Dennis Dalessandro 2016-02-14 88 * Return: pointer to allocated 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 *rdi; ff6acd69518e0a Dennis Dalessandro 2016-01-22 93 459cc69fa4c17c Leon Romanovsky 2019-01-30 @94 rdi = container_of(_ib_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 = kcalloc(nports, ff6acd69518e0a Dennis Dalessandro 2016-01-22 99 sizeof(struct rvt_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 <leonro@xxxxxxxxxxxx> :::::: CC: Jason Gunthorpe <jgg@xxxxxxxxxxxx> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx