diff options
author | Niklas Schnelle <schnelle@linux.ibm.com> | 2020-11-12 11:23:01 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-12-01 22:36:36 +0300 |
commit | ff4e5fbad06f762b8551da56e8fd64ad14c8aa3e (patch) | |
tree | 3cb909fafbf6ded41cdf64573c217462482e3359 /drivers/nvme/host/pci.c | |
parent | dab3902b19a0dd1668d0cc3e8e4b976b1ee8638c (diff) | |
download | linux-ff4e5fbad06f762b8551da56e8fd64ad14c8aa3e.tar.xz |
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: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/pci.c')
-rw-r--r-- | drivers/nvme/host/pci.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 5e6365dd0c8e..90b338435021 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -2113,8 +2113,7 @@ static int nvme_setup_io_queues(struct nvme_dev *dev) if (dev->ctrl.quirks & NVME_QUIRK_SHARED_TAGS) nr_io_queues = 1; else - nr_io_queues = min(nvme_max_io_queues(dev), - dev->nr_allocated_queues - 1); + nr_io_queues = dev->nr_allocated_queues - 1; result = nvme_set_queue_count(&dev->ctrl, &nr_io_queues); if (result < 0) |