[linux-nvme:nvme-6.17 8/8] drivers/nvme/host/pci.c:2086:26: error: passing argument 1 of '_dev_info' from incompatible pointer type
kernel test robot
lkp at intel.com
Thu Jul 17 08:06:57 PDT 2025
tree: git://git.infradead.org/nvme.git nvme-6.17
head: 1ab5ce2790f41c2966a549eeafde8f3abd46d46d
commit: 1ab5ce2790f41c2966a549eeafde8f3abd46d46d [8/8] nvme-pci: try function level reset on init failure
config: csky-randconfig-001-20250717 (https://download.01.org/0day-ci/archive/20250717/202507172219.3GZVetEC-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250717/202507172219.3GZVetEC-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/202507172219.3GZVetEC-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/acpi.h:14,
from drivers/nvme/host/pci.c:7:
drivers/nvme/host/pci.c: In function 'nvme_pci_configure_admin_queue':
>> drivers/nvme/host/pci.c:2086:26: error: passing argument 1 of '_dev_info' from incompatible pointer type [-Wincompatible-pointer-types]
2086 | dev_info(&dev->ctrl.device,
| ^~~~~~~~~~~~~~~~~
| |
| struct device **
include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
drivers/nvme/host/pci.c:2086:17: note: in expansion of macro 'dev_info'
2086 | dev_info(&dev->ctrl.device,
| ^~~~~~~~
include/linux/dev_printk.h:56:37: note: expected 'const struct device *' but argument is of type 'struct device **'
56 | void _dev_info(const struct device *dev, const char *fmt, ...);
| ~~~~~~~~~~~~~~~~~~~~~^~~
vim +/_dev_info +2086 drivers/nvme/host/pci.c
2041
2042 static int nvme_pci_configure_admin_queue(struct nvme_dev *dev)
2043 {
2044 int result;
2045 u32 aqa;
2046 struct nvme_queue *nvmeq;
2047
2048 result = nvme_remap_bar(dev, db_bar_size(dev, 0));
2049 if (result < 0)
2050 return result;
2051
2052 dev->subsystem = readl(dev->bar + NVME_REG_VS) >= NVME_VS(1, 1, 0) ?
2053 NVME_CAP_NSSRC(dev->ctrl.cap) : 0;
2054
2055 if (dev->subsystem &&
2056 (readl(dev->bar + NVME_REG_CSTS) & NVME_CSTS_NSSRO))
2057 writel(NVME_CSTS_NSSRO, dev->bar + NVME_REG_CSTS);
2058
2059 /*
2060 * If the device has been passed off to us in an enabled state, just
2061 * clear the enabled bit. The spec says we should set the 'shutdown
2062 * notification bits', but doing so may cause the device to complete
2063 * commands to the admin queue ... and we don't know what memory that
2064 * might be pointing at!
2065 */
2066 result = nvme_disable_ctrl(&dev->ctrl, false);
2067 if (result < 0) {
2068 struct pci_dev *pdev = to_pci_dev(dev->dev);
2069
2070 /*
2071 * The NVMe Controller Reset method did not get an expected
2072 * CSTS.RDY transition, so something with the device appears to
2073 * be stuck. Use the lower level and bigger hammer PCIe
2074 * Function Level Reset to attempt restoring the device to its
2075 * initial state, and try again.
2076 */
2077 result = pcie_reset_flr(pdev, false);
2078 if (result < 0)
2079 return result;
2080
2081 pci_restore_state(pdev);
2082 result = nvme_disable_ctrl(&dev->ctrl, false);
2083 if (result < 0)
2084 return result;
2085
> 2086 dev_info(&dev->ctrl.device,
2087 "controller reset completed after pcie flr\n");
2088 }
2089
2090 result = nvme_alloc_queue(dev, 0, NVME_AQ_DEPTH);
2091 if (result)
2092 return result;
2093
2094 dev->ctrl.numa_node = dev_to_node(dev->dev);
2095
2096 nvmeq = &dev->queues[0];
2097 aqa = nvmeq->q_depth - 1;
2098 aqa |= aqa << 16;
2099
2100 writel(aqa, dev->bar + NVME_REG_AQA);
2101 lo_hi_writeq(nvmeq->sq_dma_addr, dev->bar + NVME_REG_ASQ);
2102 lo_hi_writeq(nvmeq->cq_dma_addr, dev->bar + NVME_REG_ACQ);
2103
2104 result = nvme_enable_ctrl(&dev->ctrl);
2105 if (result)
2106 return result;
2107
2108 nvmeq->cq_vector = 0;
2109 nvme_init_queue(nvmeq, 0);
2110 result = queue_request_irq(nvmeq);
2111 if (result) {
2112 dev->online_queues--;
2113 return result;
2114 }
2115
2116 set_bit(NVMEQ_ENABLED, &nvmeq->flags);
2117 return result;
2118 }
2119
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the Linux-nvme
mailing list