All of lore.kernel.org
 help / color / mirror / Atom feed
* [leon-rdma:rdma-next 56/102] drivers/infiniband/hw/hns/hns_roce_mr.c:242:10: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct ib_mr *'
@ 2025-07-10  0:12 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-07-10  0:12 UTC (permalink / raw)
  To: Yishai Hadas; +Cc: llvm, oe-kbuild-all, Leon Romanovsky, Edward Srouji

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git rdma-next
head:   168eb64efd0f6c7938890d4c9029142dcd13fd7c
commit: e8063443db94464663beb65a92425bba22ae41e6 [56/102] IB: Extend UVERBS_METHOD_REG_MR to get DMAH
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20250710/202507100805.RMkoPCwe-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250710/202507100805.RMkoPCwe-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507100805.RMkoPCwe-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/infiniband/hw/hns/hns_roce_mr.c:242:10: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct ib_mr *' [-Wint-conversion]
     242 |                 return -EOPNOTSUPP;
         |                        ^~~~~~~~~~~
   1 error generated.


vim +242 drivers/infiniband/hw/hns/hns_roce_mr.c

   231	
   232	struct ib_mr *hns_roce_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
   233					   u64 virt_addr, int access_flags,
   234					   struct ib_dmah *dmah,
   235					   struct ib_udata *udata)
   236	{
   237		struct hns_roce_dev *hr_dev = to_hr_dev(pd->device);
   238		struct hns_roce_mr *mr;
   239		int ret;
   240	
   241		if (dmah)
 > 242			return -EOPNOTSUPP;
   243	
   244		mr = kzalloc(sizeof(*mr), GFP_KERNEL);
   245		if (!mr) {
   246			ret = -ENOMEM;
   247			goto err_out;
   248		}
   249	
   250		mr->iova = virt_addr;
   251		mr->size = length;
   252		mr->pd = to_hr_pd(pd)->pdn;
   253		mr->access = access_flags;
   254		mr->type = MR_TYPE_MR;
   255	
   256		ret = alloc_mr_key(hr_dev, mr);
   257		if (ret)
   258			goto err_alloc_mr;
   259	
   260		ret = alloc_mr_pbl(hr_dev, mr, udata, start);
   261		if (ret)
   262			goto err_alloc_key;
   263	
   264		ret = hns_roce_mr_enable(hr_dev, mr);
   265		if (ret)
   266			goto err_alloc_pbl;
   267	
   268		mr->ibmr.rkey = mr->ibmr.lkey = mr->key;
   269	
   270		return &mr->ibmr;
   271	
   272	err_alloc_pbl:
   273		free_mr_pbl(hr_dev, mr);
   274	err_alloc_key:
   275		free_mr_key(hr_dev, mr);
   276	err_alloc_mr:
   277		kfree(mr);
   278	err_out:
   279		atomic64_inc(&hr_dev->dfx_cnt[HNS_ROCE_DFX_MR_REG_ERR_CNT]);
   280	
   281		return ERR_PTR(ret);
   282	}
   283	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-10  0:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-10  0:12 [leon-rdma:rdma-next 56/102] drivers/infiniband/hw/hns/hns_roce_mr.c:242:10: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct ib_mr *' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.