[PATCH v2 1/2] nvme: fix build error: nvme_mpath_update stub without static

Anton Eidelman anton.eidelman at gmail.com
Wed Mar 23 17:30:07 PDT 2022


Fix multiple definition of nvme_mpath_update() on
builds with CONFIG_NVME_MULTIPATH disabled:
the stub function is missing "static inline".

Fixes: d50c992edf10 ("nvme-multipath: fix hang when disk goes live over reconnect")

Reported-by: kernel test robot <lkp at intel.com>
Signed-off-by: Anton Eidelman <anton at lightbitslabs.com>
---
 drivers/nvme/host/nvme.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 76f7a5f37379..8cf90c9ed667 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -853,7 +853,7 @@ static inline int nvme_mpath_init_identify(struct nvme_ctrl *ctrl,
 "Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n");
 	return 0;
 }
-void nvme_mpath_update(struct nvme_ctrl *ctrl)
+static inline void nvme_mpath_update(struct nvme_ctrl *ctrl)
 {
 }
 static inline void nvme_mpath_uninit(struct nvme_ctrl *ctrl)
-- 
2.25.1




More information about the Linux-nvme mailing list