All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Selvin Xavier <selvin.xavier@broadcom.com>,
	leon@kernel.org, jgg@ziepe.ca
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-rdma@vger.kernel.org,
	Selvin Xavier <selvin.xavier@broadcom.com>
Subject: Re: [PATCH for-next 1/2] RDMA/bnxt_re: Add UAPI to share a page with user space
Date: Wed, 13 Dec 2023 23:59:30 +0800	[thread overview]
Message-ID: <202312132318.8DO4UiPT-lkp@intel.com> (raw)
In-Reply-To: <1702438411-23530-2-git-send-email-selvin.xavier@broadcom.com>

Hi Selvin,

kernel test robot noticed the following build warnings:

[auto build test WARNING on rdma/for-next]
[also build test WARNING on linus/master v6.7-rc5 next-20231213]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Selvin-Xavier/RDMA-bnxt_re-Add-UAPI-to-share-a-page-with-user-space/20231213-115222
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
patch link:    https://lore.kernel.org/r/1702438411-23530-2-git-send-email-selvin.xavier%40broadcom.com
patch subject: [PATCH for-next 1/2] RDMA/bnxt_re: Add UAPI to share a page with user space
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20231213/202312132318.8DO4UiPT-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231213/202312132318.8DO4UiPT-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/202312132318.8DO4UiPT-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/infiniband/hw/bnxt_re/ib_verbs.c:4442:30: warning: variable 'cctx' set but not used [-Wunused-but-set-variable]
           struct bnxt_qplib_chip_ctx *cctx;
                                       ^
   drivers/infiniband/hw/bnxt_re/ib_verbs.c:4472:42: warning: variable 'addr' is uninitialized when used here [-Wuninitialized]
           entry = bnxt_re_mmap_entry_insert(uctx, addr, mmap_flag, &mem_offset);
                                                   ^~~~
   drivers/infiniband/hw/bnxt_re/ib_verbs.c:4448:10: note: initialize the variable 'addr' to silence this warning
           u64 addr;
                   ^
                    = 0
   drivers/infiniband/hw/bnxt_re/ib_verbs.c:4472:48: warning: variable 'mmap_flag' is uninitialized when used here [-Wuninitialized]
           entry = bnxt_re_mmap_entry_insert(uctx, addr, mmap_flag, &mem_offset);
                                                         ^~~~~~~~~
   drivers/infiniband/hw/bnxt_re/ib_verbs.c:4441:2: note: variable 'mmap_flag' is declared here
           enum bnxt_re_mmap_flag mmap_flag;
           ^
   3 warnings generated.


vim +/cctx +4442 drivers/infiniband/hw/bnxt_re/ib_verbs.c

  4431	
  4432	DECLARE_UVERBS_GLOBAL_METHODS(BNXT_RE_OBJECT_NOTIFY_DRV,
  4433				      &UVERBS_METHOD(BNXT_RE_METHOD_NOTIFY_DRV));
  4434	
  4435	/* Toggle MEM */
  4436	static int UVERBS_HANDLER(BNXT_RE_METHOD_GET_TOGGLE_MEM)(struct uverbs_attr_bundle *attrs)
  4437	{
  4438		struct ib_uobject *uobj = uverbs_attr_get_uobject(attrs, BNXT_RE_TOGGLE_MEM_HANDLE);
  4439		enum bnxt_re_get_toggle_mem_type res_type;
  4440		struct bnxt_re_user_mmap_entry *entry;
  4441		enum bnxt_re_mmap_flag mmap_flag;
> 4442		struct bnxt_qplib_chip_ctx *cctx;
  4443		struct bnxt_re_ucontext *uctx;
  4444		struct bnxt_re_dev *rdev;
  4445		u64 mem_offset;
  4446		u32 length;
  4447		u32 offset;
  4448		u64 addr;
  4449		int err;
  4450	
  4451		uctx = container_of(ib_uverbs_get_ucontext(attrs), struct bnxt_re_ucontext, ib_uctx);
  4452		if (IS_ERR(uctx))
  4453			return PTR_ERR(uctx);
  4454	
  4455		err = uverbs_get_const(&res_type, attrs, BNXT_RE_TOGGLE_MEM_TYPE);
  4456		if (err)
  4457			return err;
  4458	
  4459		rdev = uctx->rdev;
  4460		cctx = rdev->chip_ctx;
  4461	
  4462		switch (res_type) {
  4463		case BNXT_RE_CQ_TOGGLE_MEM:
  4464			break;
  4465		case BNXT_RE_SRQ_TOGGLE_MEM:
  4466			break;
  4467	
  4468		default:
  4469			return -EOPNOTSUPP;
  4470		}
  4471	
  4472		entry = bnxt_re_mmap_entry_insert(uctx, addr, mmap_flag, &mem_offset);
  4473		if (!entry)
  4474			return -ENOMEM;
  4475	
  4476		uobj->object = entry;
  4477		uverbs_finalize_uobj_create(attrs, BNXT_RE_TOGGLE_MEM_HANDLE);
  4478		err = uverbs_copy_to(attrs, BNXT_RE_TOGGLE_MEM_MMAP_PAGE,
  4479				     &mem_offset, sizeof(mem_offset));
  4480		if (err)
  4481			return err;
  4482	
  4483		err = uverbs_copy_to(attrs, BNXT_RE_TOGGLE_MEM_MMAP_LENGTH,
  4484				     &length, sizeof(length));
  4485		if (err)
  4486			return err;
  4487	
  4488		err = uverbs_copy_to(attrs, BNXT_RE_TOGGLE_MEM_MMAP_OFFSET,
  4489				     &offset, sizeof(length));
  4490		if (err)
  4491			return err;
  4492	
  4493		return 0;
  4494	}
  4495	

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

  parent reply	other threads:[~2023-12-13 16:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-13  3:33 [PATCH for-next 0/2] RDMA/bnxt_re: Share the CQ pages for GenP7 adapters Selvin Xavier
2023-12-13  3:33 ` [PATCH for-next 1/2] RDMA/bnxt_re: Add UAPI to share a page with user space Selvin Xavier
2023-12-13  8:09   ` Leon Romanovsky
2023-12-13  8:17     ` Selvin Xavier
2023-12-13 15:59   ` kernel test robot [this message]
2023-12-13  3:33 ` [PATCH for-next 2/2] RDMA/bnxt_re: Share a page to expose per CQ info with userspace Selvin Xavier
2023-12-13  8:20   ` Leon Romanovsky
2023-12-13  8:38     ` Selvin Xavier
2023-12-13 16:21   ` kernel test robot
2023-12-13 19:48   ` kernel test robot

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=202312132318.8DO4UiPT-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=selvin.xavier@broadcom.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.