diff options
author | Baolin Wang <baolin.wang@linux.alibaba.com> | 2020-06-24 14:49:58 +0800 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-07-08 16:16:19 +0200 |
commit | f5af577d553103115579b5e404070dfab4d00332 (patch) | |
tree | f70b00c072f5fb3c562dfd2fa7c0fb997f3a46d0 | |
parent | b8a12e93570d8aa7fbfe2b8909eee8fd0f778afd (diff) | |
download | linux-f5af577d553103115579b5e404070dfab4d00332.tar.bz2 |
nvme: use USEC_PER_SEC instead of magic numbers
Use USEC_PER_SEC instead of magic numbers to make code more readable.
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | drivers/nvme/host/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index c1de05646a02..96898040a6d5 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2947,7 +2947,7 @@ int nvme_init_identify(struct nvme_ctrl *ctrl) if (id->rtd3e) { /* us -> s */ - u32 transition_time = le32_to_cpu(id->rtd3e) / 1000000; + u32 transition_time = le32_to_cpu(id->rtd3e) / USEC_PER_SEC; ctrl->shutdown_timeout = clamp_t(unsigned int, transition_time, shutdown_timeout, 60); |