All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yishai Hadas <yishaih@nvidia.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Leon Romanovsky <leon@kernel.org>,
	Edward Srouji <edwards@nvidia.com>
Subject: [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 *'
Date: Thu, 10 Jul 2025 08:12:08 +0800	[thread overview]
Message-ID: <202507100805.RMkoPCwe-lkp@intel.com> (raw)

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

                 reply	other threads:[~2025-07-10  0:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202507100805.RMkoPCwe-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=edwards@nvidia.com \
    --cc=leon@kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=yishaih@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.