Commit ff4e5fba authored by Niklas Schnelle's avatar Niklas Schnelle Committed by Christoph Hellwig

nvme-pci: drop min() from nr_io_queues assignment

in nvme_setup_io_queues() the number of I/O queues is set to either 1 in
case of a quirky Apple device or to the min of nvme_max_io_queues() or
dev->nr_allocated_queues - 1.
This is unnecessarily complicated as dev->nr_allocated_queues is only
assigned once and is nvme_max_io_queues() + 1.
Signed-off-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent dab3902b
...@@ -2113,8 +2113,7 @@ static int nvme_setup_io_queues(struct nvme_dev *dev) ...@@ -2113,8 +2113,7 @@ static int nvme_setup_io_queues(struct nvme_dev *dev)
if (dev->ctrl.quirks & NVME_QUIRK_SHARED_TAGS) if (dev->ctrl.quirks & NVME_QUIRK_SHARED_TAGS)
nr_io_queues = 1; nr_io_queues = 1;
else else
nr_io_queues = min(nvme_max_io_queues(dev), nr_io_queues = dev->nr_allocated_queues - 1;
dev->nr_allocated_queues - 1);
result = nvme_set_queue_count(&dev->ctrl, &nr_io_queues); result = nvme_set_queue_count(&dev->ctrl, &nr_io_queues);
if (result < 0) if (result < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment