Skip to contentSkip to conversation

nvme-pci: cleaning up nvme_pci_init_request

PATCH Applied Irvin Cote 3 participants 3 messages May 12, 2023 – May 15, 2023 NVMe

lore
Share & tools
lore

Irvin Cote

author
#0 lore raw

PATCH 1/1 nvme-pci: cleaning up nvme_pci_init_request

Erase the superfluous line that retrieves the nvme_dev.

---
 drivers/nvme/host/pci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/nvme/host/pci.c +1 -2
index 7f25c0fe3a0b..b027e5e3f4ac 100644
@@ -420,10 +420,9 @@ static int nvme_pci_init_request(struct blk_mq_tag_set *set,
 		struct request *req, unsigned int hctx_idx,
 		unsigned int numa_node)
 {
-	struct nvme_dev *dev = to_nvme_dev(set->driver_data);
 	struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
 
-	nvme_req(req)->ctrl = &dev->ctrl;
+	nvme_req(req)->ctrl = set->driver_data;
 	nvme_req(req)->cmd = &iod->cmd;
 	return 0;
 }
Signature · 1 line
2.39.2