Skip to contentSkip to conversation

nvme-pci : redundancies in nvme_alloc_queue and nvme_init_queue

PATCH Applied Irvin Cote 2 participants 5 messages May 21, 2023 – May 25, 2023 NVMe

lore
Share & tools
lore

Irvin Cote

author
#0 lore raw

PATCH 1/1 nvme-pci : redundancies in nvme_alloc_queue and nvme_init_queue

cq_head cq_phase and q_db are getting set in nvme_alloc_queue and in nvme_init_queue, make it so that they are only set once in nvme_init_queue.

---
 drivers/nvme/host/pci.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/nvme/host/pci.c +0 -3
index 32244582fdb0..49ae26980a0f 100644
@@ -1533,9 +1533,6 @@ static int nvme_alloc_queue(struct nvme_dev *dev, int qid, int depth)
 	nvmeq->dev = dev;
 	spin_lock_init(&nvmeq->sq_lock);
 	spin_lock_init(&nvmeq->cq_poll_lock);
-	nvmeq->cq_head = 0;
-	nvmeq->cq_phase = 1;
-	nvmeq->q_db = &dev->dbs[qid * 2 * dev->db_stride];
 	nvmeq->qid = qid;
 	dev->ctrl.queue_count++;
 
Signature · 1 line
2.39.2
author
#1 lore raw

I'm trying to resend the patch but somehow all the new attempts seem to bind to this thread...

Quoted 27 lines · Irvin Cote

cq_head cq_phase and q_db are getting set in nvme_alloc_queue and in nvme_init_queue, make it so that they are only set once in nvme_init_queue.

---
 drivers/nvme/host/pci.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/nvme/host/pci.c +0 -4
index 32244582fdb0..49ae26980a0f 100644
@@ -1533,9 +1533,6 @@ static int nvme_alloc_queue(struct nvme_dev *dev, int qid, int depth)
        nvmeq->dev = dev;
        spin_lock_init(&nvmeq->sq_lock);
        spin_lock_init(&nvmeq->cq_poll_lock);
-       nvmeq->cq_head = 0;
-       nvmeq->cq_phase = 1;
-       nvmeq->q_db = &dev->dbs[qid * 2 * dev->db_stride];
        nvmeq->qid = qid;
        dev->ctrl.queue_count++;
 
--

2.39.2

maintainer
#2 lore raw
Quoted 2 lines · irvin cote

I'm trying to resend the patch but somehow all the new attempts seem to bind to this thread...

It's not really a big deal to me that it's continuing the previous thread, but how are you sending your patches? If you just use 'git send-email' without specifying any reply identifier, that should start a new thread.

author
#3 lore raw

I was just re-executing the same initial git send-mail command. In the end I just changed the subject and it worked, maybe the subject was used as a reply identifier

Quoted 9 lines · Keith Busch
Quoted 2 lines · irvin cote

I'm trying to resend the patch but somehow all the new attempts seem to bind to this thread...

It's not really a big deal to me that it's continuing the previous thread, but how are you sending your patches? If you just use 'git send-email' without specifying any reply identifier, that should start a new thread.