Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [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 *'
@ 2026-05-06  8:24 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-06  8:24 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: llvm, oe-kbuild-all

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

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

only message in thread, other threads:[~2026-05-06  8:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-06  8:24 [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 *' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox