diff options
author | Adam Manzanares <a.manzanares@samsung.com> | 2021-08-27 00:15:45 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-09-06 10:59:02 +0300 |
commit | 43dc987828eabf915858b1ac37a8e67fa8004349 (patch) | |
tree | b047597935a6fbf4d7356b13f0db75f0f605c188 /drivers/nvme | |
parent | e7d65803e2bb5bc739548b67a5fc72c626cf7e3b (diff) | |
download | linux-43dc987828eabf915858b1ac37a8e67fa8004349.tar.xz |
nvme: move nvme_multi_css into nvme.h
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>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/core.c | 5 | ||||
-rw-r--r-- | drivers/nvme/host/nvme.h | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index f5502ee45b96..4be4845638e6 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -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) { diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 8fd30ef19757..9871c0c9374c 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -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 */ |