diff options
author | Christoph Hellwig <hch@lst.de> | 2020-09-28 14:08:28 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-10-07 07:56:19 +0200 |
commit | 7b15336257ed5623cddefa8d33069777494c98e0 (patch) | |
tree | 0844461839f3361066170ce8d08d36ba23b509d4 /drivers/nvme/host | |
parent | 0a05226a3a2038b28d78101239196222d375124a (diff) | |
download | linux-7b15336257ed5623cddefa8d33069777494c98e0.tar.bz2 |
nvme: remove nvme_identify_ns_list
Just fold it into the only caller.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Diffstat (limited to 'drivers/nvme/host')
-rw-r--r-- | drivers/nvme/host/core.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 0b88a377a47f..385b10317873 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1326,17 +1326,6 @@ free_data: return status; } -static int nvme_identify_ns_list(struct nvme_ctrl *dev, unsigned nsid, __le32 *ns_list) -{ - struct nvme_command c = { }; - - c.identify.opcode = nvme_admin_identify; - c.identify.cns = NVME_ID_CNS_NS_ACTIVE_LIST; - c.identify.nsid = cpu_to_le32(nsid); - return nvme_submit_sync_cmd(dev->admin_q, &c, ns_list, - NVME_IDENTIFY_DATA_SIZE); -} - static int nvme_identify_ns(struct nvme_ctrl *ctrl, unsigned nsid, struct nvme_ns_ids *ids, struct nvme_id_ns **id) { @@ -4042,7 +4031,14 @@ static int nvme_scan_ns_list(struct nvme_ctrl *ctrl) return -ENOMEM; for (;;) { - ret = nvme_identify_ns_list(ctrl, prev, ns_list); + struct nvme_command cmd = { + .identify.opcode = nvme_admin_identify, + .identify.cns = NVME_ID_CNS_NS_ACTIVE_LIST, + .identify.nsid = cpu_to_le32(prev), + }; + + ret = nvme_submit_sync_cmd(ctrl->admin_q, &cmd, ns_list, + NVME_IDENTIFY_DATA_SIZE); if (ret) goto free; |