Thread (19 messages) 19 messages, 3 authors, 2021-02-24
STALE1951d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 04/14] nvme-core: fix the type for shutdown_timeout

From: Chaitanya Kulkarni <hidden>
Date: 2021-02-17 00:11:15
Subsystem: nvm express driver, the rest · Maintainers: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg, Linus Torvalds

In the function nvme_init_identify() we calculate the
ctrl->shutdown_timeout value with module parameter shutdown_timeout
and transition_timeout with clamp_t().

The variable ctrl->shutdown_timeout and transition_timeout is of type
unsigned int.

Change the module parameter shutdown_timeout from unsigned char to
unsigned int so it stays consistent with the type of local variable
transition_timeout, ctrl->shutdown_timeout & clamp_t unsigned int type.

Signed-off-by: Chaitanya Kulkarni <redacted>
---
 drivers/nvme/host/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index cae526757e03..840c32c755b2 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -40,8 +40,8 @@ module_param_named(io_timeout, nvme_io_timeout, uint, 0644);
 MODULE_PARM_DESC(io_timeout, "timeout in seconds for I/O");
 EXPORT_SYMBOL_GPL(nvme_io_timeout);
 
-static unsigned char shutdown_timeout = 5;
-module_param(shutdown_timeout, byte, 0644);
+static unsigned int shutdown_timeout = 5;
+module_param(shutdown_timeout, uint, 0644);
 MODULE_PARM_DESC(shutdown_timeout, "timeout in seconds for controller shutdown");
 
 static u8 nvme_max_retries = 5;
-- 
2.22.1


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help