nvme: move nvme_multi_css into nvme.h
authorAdam Manzanares <a.manzanares@samsung.com>
Thu, 26 Aug 2021 21:15:45 +0000 (21:15 +0000)
committerChristoph Hellwig <hch@lst.de>
Mon, 6 Sep 2021 07:59:02 +0000 (09:59 +0200)
Preparatory patch in order to reuse nvme_multi_css in the nvme target
code.

Signed-off-by: Adam Manzanares <a.manzanares@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h

index f5502ee45b96adce332abdd641126ba97c1d9473..4be4845638e6473978ad034a9d5a6697bfbd3375 100644 (file)
@@ -1302,11 +1302,6 @@ static int nvme_identify_ctrl(struct nvme_ctrl *dev, struct nvme_id_ctrl **id)
        return error;
 }
 
-static bool nvme_multi_css(struct nvme_ctrl *ctrl)
-{
-       return (ctrl->ctrl_config & NVME_CC_CSS_MASK) == NVME_CC_CSS_CSI;
-}
-
 static int nvme_process_ns_desc(struct nvme_ctrl *ctrl, struct nvme_ns_ids *ids,
                struct nvme_ns_id_desc *cur, bool *csi_seen)
 {
index 8fd30ef19757696577a3e2aff1496aa36df54cdc..9871c0c9374c4c40d7672bab0f663f290b5f34ce 100644 (file)
@@ -892,4 +892,9 @@ struct nvme_ctrl *nvme_ctrl_from_file(struct file *file);
 struct nvme_ns *nvme_find_get_ns(struct nvme_ctrl *ctrl, unsigned nsid);
 void nvme_put_ns(struct nvme_ns *ns);
 
+static inline bool nvme_multi_css(struct nvme_ctrl *ctrl)
+{
+       return (ctrl->ctrl_config & NVME_CC_CSS_MASK) == NVME_CC_CSS_CSI;
+}
+
 #endif /* _NVME_H */