[linux-nvme:nvme-6.7 5/6] drivers/nvme/host/rdma.c:987:47: error: passing argument 1 of 'nvme_ctrl_state' from incompatible pointer type

kernel test robot lkp at intel.com
Tue Nov 28 18:38:00 PST 2023


tree:   git://git.infradead.org/nvme.git nvme-6.7
head:   b6cbe703db447a22f70caa0ee9cf616ac26cdc37
commit: 822d50c036c6af2e6a42b45b2e63cb02d6233c2b [5/6] nvme: ensure reset state check ordering
config: i386-buildonly-randconfig-002-20231129 (https://download.01.org/0day-ci/archive/20231129/202311290724.uhn9SbbS-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231129/202311290724.uhn9SbbS-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311290724.uhn9SbbS-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/nvme/host/rdma.c: In function 'nvme_rdma_reconnect_or_remove':
>> drivers/nvme/host/rdma.c:987:47: error: passing argument 1 of 'nvme_ctrl_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
     enum nvme_ctrl_state state = nvme_ctrl_state(ctrl);
                                                  ^~~~
   In file included from drivers/nvme/host/rdma.c:27:0:
   drivers/nvme/host/nvme.h:390:36: note: expected 'struct nvme_ctrl *' but argument is of type 'struct nvme_rdma_ctrl *'
    static inline enum nvme_ctrl_state nvme_ctrl_state(struct nvme_ctrl *ctrl)
                                       ^~~~~~~~~~~~~~~
   drivers/nvme/host/rdma.c: In function 'nvme_rdma_setup_ctrl':
   drivers/nvme/host/rdma.c:1063:48: error: passing argument 1 of 'nvme_ctrl_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
      enum nvme_ctrl_state state = nvme_ctrl_state(ctrl);
                                                   ^~~~
   In file included from drivers/nvme/host/rdma.c:27:0:
   drivers/nvme/host/nvme.h:390:36: note: expected 'struct nvme_ctrl *' but argument is of type 'struct nvme_rdma_ctrl *'
    static inline enum nvme_ctrl_state nvme_ctrl_state(struct nvme_ctrl *ctrl)
                                       ^~~~~~~~~~~~~~~
   drivers/nvme/host/rdma.c: In function 'nvme_rdma_error_recovery_work':
   drivers/nvme/host/rdma.c:1135:48: error: passing argument 1 of 'nvme_ctrl_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
      enum nvme_ctrl_state state = nvme_ctrl_state(ctrl);
                                                   ^~~~
   In file included from drivers/nvme/host/rdma.c:27:0:
   drivers/nvme/host/nvme.h:390:36: note: expected 'struct nvme_ctrl *' but argument is of type 'struct nvme_rdma_ctrl *'
    static inline enum nvme_ctrl_state nvme_ctrl_state(struct nvme_ctrl *ctrl)
                                       ^~~~~~~~~~~~~~~
   drivers/nvme/host/rdma.c: In function 'nvme_rdma_wr_error':
   drivers/nvme/host/rdma.c:1170:22: error: passing argument 1 of 'nvme_ctrl_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
     if (nvme_ctrl_state(ctrl) == NVME_CTRL_LIVE)
                         ^~~~
   In file included from drivers/nvme/host/rdma.c:27:0:
   drivers/nvme/host/nvme.h:390:36: note: expected 'struct nvme_ctrl *' but argument is of type 'struct nvme_rdma_ctrl *'
    static inline enum nvme_ctrl_state nvme_ctrl_state(struct nvme_ctrl *ctrl)
                                       ^~~~~~~~~~~~~~~
   drivers/nvme/host/rdma.c: In function 'nvme_rdma_timeout':
   drivers/nvme/host/rdma.c:1953:22: error: passing argument 1 of 'nvme_ctrl_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
     if (nvme_ctrl_state(ctrl) != NVME_CTRL_LIVE) {
                         ^~~~
   In file included from drivers/nvme/host/rdma.c:27:0:
   drivers/nvme/host/nvme.h:390:36: note: expected 'struct nvme_ctrl *' but argument is of type 'struct nvme_rdma_ctrl *'
    static inline enum nvme_ctrl_state nvme_ctrl_state(struct nvme_ctrl *ctrl)
                                       ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/nvme_ctrl_state +987 drivers/nvme/host/rdma.c

   984	
   985	static void nvme_rdma_reconnect_or_remove(struct nvme_rdma_ctrl *ctrl)
   986	{
 > 987		enum nvme_ctrl_state state = nvme_ctrl_state(ctrl);
   988	
   989		/* If we are resetting/deleting then do nothing */
   990		if (state != NVME_CTRL_CONNECTING) {
   991			WARN_ON_ONCE(state == NVME_CTRL_NEW || state == NVME_CTRL_LIVE);
   992			return;
   993		}
   994	
   995		if (nvmf_should_reconnect(&ctrl->ctrl)) {
   996			dev_info(ctrl->ctrl.device, "Reconnecting in %d seconds...\n",
   997				ctrl->ctrl.opts->reconnect_delay);
   998			queue_delayed_work(nvme_wq, &ctrl->reconnect_work,
   999					ctrl->ctrl.opts->reconnect_delay * HZ);
  1000		} else {
  1001			nvme_delete_ctrl(&ctrl->ctrl);
  1002		}
  1003	}
  1004	

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



More information about the Linux-nvme mailing list