Skip to content

Commit 7b15336

Browse files
author
Christoph Hellwig
committed
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>
1 parent 0a05226 commit 7b15336

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

drivers/nvme/host/core.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,17 +1326,6 @@ static int nvme_identify_ns_descs(struct nvme_ctrl *ctrl, unsigned nsid,
13261326
return status;
13271327
}
13281328

1329-
static int nvme_identify_ns_list(struct nvme_ctrl *dev, unsigned nsid, __le32 *ns_list)
1330-
{
1331-
struct nvme_command c = { };
1332-
1333-
c.identify.opcode = nvme_admin_identify;
1334-
c.identify.cns = NVME_ID_CNS_NS_ACTIVE_LIST;
1335-
c.identify.nsid = cpu_to_le32(nsid);
1336-
return nvme_submit_sync_cmd(dev->admin_q, &c, ns_list,
1337-
NVME_IDENTIFY_DATA_SIZE);
1338-
}
1339-
13401329
static int nvme_identify_ns(struct nvme_ctrl *ctrl, unsigned nsid,
13411330
struct nvme_ns_ids *ids, struct nvme_id_ns **id)
13421331
{
@@ -4042,7 +4031,14 @@ static int nvme_scan_ns_list(struct nvme_ctrl *ctrl)
40424031
return -ENOMEM;
40434032

40444033
for (;;) {
4045-
ret = nvme_identify_ns_list(ctrl, prev, ns_list);
4034+
struct nvme_command cmd = {
4035+
.identify.opcode = nvme_admin_identify,
4036+
.identify.cns = NVME_ID_CNS_NS_ACTIVE_LIST,
4037+
.identify.nsid = cpu_to_le32(prev),
4038+
};
4039+
4040+
ret = nvme_submit_sync_cmd(ctrl->admin_q, &cmd, ns_list,
4041+
NVME_IDENTIFY_DATA_SIZE);
40464042
if (ret)
40474043
goto free;
40484044

0 commit comments

Comments
 (0)