* [PATCH] nvme: mark shutdown_timeout static
@ 2017-06-12 16:30 Christoph Hellwig
2017-06-13 7:39 ` Johannes Thumshirn
2017-06-15 9:18 ` Sagi Grimberg
0 siblings, 2 replies; 4+ messages in thread
From: Christoph Hellwig @ 2017-06-12 16:30 UTC (permalink / raw)
And open code the SHUTDOWN_TIMEOUT macro.
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
drivers/nvme/host/core.c | 4 ++--
drivers/nvme/host/nvme.h | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 0628bfddf480..1a8b0bd77673 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -45,7 +45,7 @@ module_param_named(io_timeout, nvme_io_timeout, byte, 0644);
MODULE_PARM_DESC(io_timeout, "timeout in seconds for I/O");
EXPORT_SYMBOL_GPL(nvme_io_timeout);
-unsigned char shutdown_timeout = 5;
+static unsigned char shutdown_timeout = 5;
module_param(shutdown_timeout, byte, 0644);
MODULE_PARM_DESC(shutdown_timeout, "timeout in seconds for controller shutdown");
@@ -1379,7 +1379,7 @@ EXPORT_SYMBOL_GPL(nvme_enable_ctrl);
int nvme_shutdown_ctrl(struct nvme_ctrl *ctrl)
{
- unsigned long timeout = SHUTDOWN_TIMEOUT + jiffies;
+ unsigned long timeout = jiffies + (shutdown_timeout * HZ);
u32 csts;
int ret;
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 94ec0bc405ed..f27c58b860f4 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -27,9 +27,6 @@ extern unsigned char nvme_io_timeout;
extern unsigned char admin_timeout;
#define ADMIN_TIMEOUT (admin_timeout * HZ)
-extern unsigned char shutdown_timeout;
-#define SHUTDOWN_TIMEOUT (shutdown_timeout * HZ)
-
#define NVME_DEFAULT_KATO 5
#define NVME_KATO_GRACE 10
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] nvme: mark shutdown_timeout static
2017-06-12 16:30 [PATCH] nvme: mark shutdown_timeout static Christoph Hellwig
@ 2017-06-13 7:39 ` Johannes Thumshirn
2017-06-15 8:50 ` Sagi Grimberg
2017-06-15 9:18 ` Sagi Grimberg
1 sibling, 1 reply; 4+ messages in thread
From: Johannes Thumshirn @ 2017-06-13 7:39 UTC (permalink / raw)
On 06/12/2017 06:30 PM, Christoph Hellwig wrote:
> And open code the SHUTDOWN_TIMEOUT macro.
>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> ---
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
--
Johannes Thumshirn Storage
jthumshirn at suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] nvme: mark shutdown_timeout static
2017-06-13 7:39 ` Johannes Thumshirn
@ 2017-06-15 8:50 ` Sagi Grimberg
0 siblings, 0 replies; 4+ messages in thread
From: Sagi Grimberg @ 2017-06-15 8:50 UTC (permalink / raw)
Looks good,
Reviewed-by: Sagi Grimberg <sagi at grimberg.me>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] nvme: mark shutdown_timeout static
2017-06-12 16:30 [PATCH] nvme: mark shutdown_timeout static Christoph Hellwig
2017-06-13 7:39 ` Johannes Thumshirn
@ 2017-06-15 9:18 ` Sagi Grimberg
1 sibling, 0 replies; 4+ messages in thread
From: Sagi Grimberg @ 2017-06-15 9:18 UTC (permalink / raw)
Reviewed-by: Sagi Grimberg <sagi at grimberg.me>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-15 9:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-12 16:30 [PATCH] nvme: mark shutdown_timeout static Christoph Hellwig
2017-06-13 7:39 ` Johannes Thumshirn
2017-06-15 8:50 ` Sagi Grimberg
2017-06-15 9:18 ` Sagi Grimberg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.