From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB8FEC43603 for ; Fri, 6 Dec 2019 17:13:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C0D0624670 for ; Fri, 6 Dec 2019 17:13:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iqrFm8s0"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="FD0hkLsH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0D0624670 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=L07CXei9Ik6QUdmy+MyvrfNx8zAEg6kX+ZsZVx6e0BA=; b=iqrFm8s0wngLPZ 6ubGhVBIcKkPzhr6qtoFXJVOFWkVHy0nBnMHWtCrMEIyC0oc9s8JAPjZXEpqgtBO+USdCM1o5/ZN5 WnE2xbbSbmlZh5g+D/FFZMghQ4cSr6lsrj75wiawZBLrQRE9MM8Ax279edCW6ob/4FLpnYNWUS8Ny 8dXfhTvNwKS4Z/fRudZx+LIz3AtCjnqJfiGkF3gaEU5U2lgQX9mz9dpcOSI89vm+yD9c6u6q+wFpA tq3bnp0f9mLYaAhR1omFL/EJ5EiPB7v+9ZGUtV3lFun77AbeU1dqWHVjPd9MBN2sHr6dyPZsJ/KKf kEv/xRDojAf9zSnhQelw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1idHAa-00006B-DE; Fri, 06 Dec 2019 17:13:32 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1idHAV-0008SO-6g for linux-nvme@lists.infradead.org; Fri, 06 Dec 2019 17:13:28 +0000 Received: from redsun51.ssa.fujisawa.hgst.com (unknown [199.255.47.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 289F924659; Fri, 6 Dec 2019 17:13:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575652406; bh=ytViLkF3LsBCy2tQc5we7hDN6fJ3TO0V4KktU9SdtT8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FD0hkLsHBAUtlSAN329NwMEQ995lkRrKQladfchpNE2Mjwkl1o3rKhQUWD7DzOVpM qQVs0T6iZVr5pz3MpMsLDnOfmGQJyHql2viX+ONbd2RIWOlKgMbPEi9bVHJgyhtmKk xZrNm+uq1hySccXfzOKTVK0zMPFrFKo+XwO+ZD0c= From: Keith Busch To: linux-nvme@lists.infradead.org, hch@lst.de, sagi@grimberg.me Subject: [PATCH 1/3] nvme/pci: Fix write and poll queue types Date: Sat, 7 Dec 2019 02:13:14 +0900 Message-Id: <20191206171316.2421-2-kbusch@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191206171316.2421-1-kbusch@kernel.org> References: <20191206171316.2421-1-kbusch@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191206_091327_260196_15970BB5 X-CRM114-Status: UNSURE ( 9.85 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Keith Busch Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org 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); MODULE_PARM_DESC(write_queues, "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; -- 2.21.0 _______________________________________________ linux-nvme mailing list linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme