archive mirror
 help / color / mirror / Atom feed
From: Keith Busch <>
Cc: Keith Busch <>
Subject: [PATCH 1/3] nvme/pci: Fix write and poll queue types
Date: Sat,  7 Dec 2019 02:13:14 +0900	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

The number of poll or write queues should never be negative. Use unsigned
types so that it's not possible to have the driver allocate no queues.

Signed-off-by: Keith Busch <>
 drivers/nvme/host/pci.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 68701921dc23..7186f21ad899 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -66,14 +66,14 @@ static int io_queue_depth = 1024;
 module_param_cb(io_queue_depth, &io_queue_depth_ops, &io_queue_depth, 0644);
 MODULE_PARM_DESC(io_queue_depth, "set io queue depth, should >= 2");
-static int write_queues;
-module_param(write_queues, int, 0644);
+static unsigned int write_queues;
+module_param(write_queues, uint, 0644);
 	"Number of queues to use for writes. If not set, reads and writes "
 	"will share a queue set.");
-static int poll_queues;
-module_param(poll_queues, int, 0644);
+static unsigned int poll_queues;
+module_param(poll_queues, uint, 0644);
 MODULE_PARM_DESC(poll_queues, "Number of queues to use for polled IO.");
 struct nvme_dev;

linux-nvme mailing list

  reply	other threads:[~2019-12-06 17:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06 17:13 [PATCH 0/3] nvme specialized queue fixes Keith Busch
2019-12-06 17:13 ` Keith Busch [this message]
2019-12-06 17:13 ` [PATCH 2/3] nvme/pci Limit write queue sizes to possible cpus Keith Busch
2019-12-06 17:13 ` [PATCH 3/3] nvme/pci: Fix read queue count Keith Busch
2019-12-07  8:55   ` Ming Lei
2019-12-06 17:46 ` [PATCH 0/3] nvme specialized queue fixes Jens Axboe
2019-12-06 17:58   ` Keith Busch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).