Skip to contentSkip to conversation

Subject: [PATCH] nvme : host : pci.c : Replace int literal by corresponding macro

PATCH Irvin Cote 1 participant 1 message Feb 2, 2023 NVMe

lore
Share & tools
lore

Irvin Cote

author
#0 lore raw

From e88b6a92c2447c2d5a343ca53cd735f4f83848d0 Mon Sep 17 00:00:00 2001
From: Irvin Cote <[email protected]>
Date: Wed, 1 Feb 2023 23:14:25 -0300
Subject: [PATCH] nvme : host : pci.c : Replace int literal by corresponding macro When re-setting the dbs field of the nvme_dev struct in the nvme_pci_enable function, a integer literal is used to represent the offset instead of the dedicated macro NVME_REG_DBS.

---
 drivers/nvme/host/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/pci.c +1 -1
index c734934c407c..ba65299636e1 100644
@@ -2540,7 +2540,7 @@ static int nvme_pci_enable(struct nvme_dev *dev)
 	dev->q_depth = min_t(u32, NVME_CAP_MQES(dev->ctrl.cap) + 1,
 				io_queue_depth);
 	dev->db_stride = 1 << NVME_CAP_STRIDE(dev->ctrl.cap);
-	dev->dbs = dev->bar + 4096;
+	dev->dbs = dev->bar + NVME_REG_DBS;
 
 	/*
 	 * Some Apple controllers require a non-standard SQE size.

--
2.37.2