Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Hannes Reinecke <hare@suse.de>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [hare-nvme:virtual-subsys.v7 3/7] drivers/nvme/host/core.c:3960:30: error: incompatible pointer types passing 'struct nvme_subsystem *' to parameter of type 'struct nvme_ctrl *'
Date: Wed, 06 May 2026 16:24:44 +0800	[thread overview]
Message-ID: <202605061647.N9yc9XVx-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hare/nvme.git virtual-subsys.v7
head:   d28dfc8d88a694c49437ebff946b86d35fb2ce56
commit: 743f32b59ff12e69735b0d0aeb7d289f968a56ce [3/7] nvme: use a subsystem argument in nvme_alloc_ns_head()
config: hexagon-randconfig-002-20260506 (https://download.01.org/0day-ci/archive/20260506/202605061647.N9yc9XVx-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260506/202605061647.N9yc9XVx-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/202605061647.N9yc9XVx-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/nvme/host/core.c:3960:30: error: incompatible pointer types passing 'struct nvme_subsystem *' to parameter of type 'struct nvme_ctrl *' [-Wincompatible-pointer-types]
    3960 |         ret = nvme_mpath_alloc_disk(subsys, head);
         |                                     ^~~~~~
   drivers/nvme/host/nvme.h:1088:59: note: passing argument to parameter 'ctrl' here
    1088 | static inline int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl,
         |                                                           ^
   1 error generated.


vim +3960 drivers/nvme/host/core.c

  3931	
  3932		head = kzalloc(size, GFP_KERNEL);
  3933		if (!head)
  3934			goto out;
  3935		ret = ida_alloc_min(&subsys->ns_ida, 1, GFP_KERNEL);
  3936		if (ret < 0)
  3937			goto out_free_head;
  3938		head->instance = ret;
  3939		INIT_LIST_HEAD(&head->list);
  3940		ret = init_srcu_struct(&head->srcu);
  3941		if (ret)
  3942			goto out_ida_remove;
  3943		head->subsys = subsys;
  3944		head->ns_id = info->nsid;
  3945		head->ids = info->ids;
  3946		head->shared = info->is_shared;
  3947		head->rotational = info->is_rotational;
  3948		head->unique_nsid = head->shared || nvme_ctrl_is_unique_nsid(ctrl);
  3949		ratelimit_state_init(&head->rs_nuse, 5 * HZ, 1);
  3950		ratelimit_set_flags(&head->rs_nuse, RATELIMIT_MSG_ON_RELEASE);
  3951		kref_init(&head->ref);
  3952	
  3953		if (head->ids.csi) {
  3954			ret = nvme_get_effects_log(ctrl, head->ids.csi, &head->effects);
  3955			if (ret)
  3956				goto out_cleanup_srcu;
  3957		} else
  3958			head->effects = ctrl->effects;
  3959	
> 3960		ret = nvme_mpath_alloc_disk(subsys, head);
  3961		if (ret)
  3962			goto out_cleanup_srcu;
  3963	
  3964		list_add_tail(&head->entry, &subsys->nsheads);
  3965	
  3966		kref_get(&subsys->ref);
  3967	
  3968		return head;
  3969	out_cleanup_srcu:
  3970		cleanup_srcu_struct(&head->srcu);
  3971	out_ida_remove:
  3972		ida_free(&subsys->ns_ida, head->instance);
  3973	out_free_head:
  3974		kfree(head);
  3975	out:
  3976		if (ret > 0)
  3977			ret = blk_status_to_errno(nvme_error_status(ret));
  3978		return ERR_PTR(ret);
  3979	}
  3980	

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

                 reply	other threads:[~2026-05-06  8:25 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=202605061647.N9yc9XVx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hare@suse.de \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox