diff options
author | Minwoo Im <minwoo.im.dev@gmail.com> | 2017-12-04 15:23:54 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-01-08 05:01:57 -0500 |
commit | 6fbcde6691b514faa963c60f5537332530f1bf0a (patch) | |
tree | 14e98859c90e972ed25617736b55b161bfb17dd7 | |
parent | 0de5cd367c6aa2a31a1c931628f778f79f8ef22e (diff) |
nvme-pci: remove an unnecessary initialization in HMB code
The local variable __size__ will be set a bit later in a for-loop.
Remove the explicit initialization at the beginning of this function.
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | drivers/nvme/host/pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index f5800c3c9082..35331fa0013c 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c | |||
@@ -1770,7 +1770,7 @@ static int __nvme_alloc_host_mem(struct nvme_dev *dev, u64 preferred, | |||
1770 | dma_addr_t descs_dma; | 1770 | dma_addr_t descs_dma; |
1771 | int i = 0; | 1771 | int i = 0; |
1772 | void **bufs; | 1772 | void **bufs; |
1773 | u64 size = 0, tmp; | 1773 | u64 size, tmp; |
1774 | 1774 | ||
1775 | tmp = (preferred + chunk_size - 1); | 1775 | tmp = (preferred + chunk_size - 1); |
1776 | do_div(tmp, chunk_size); | 1776 | do_div(tmp, chunk_size); |
@@ -1853,7 +1853,7 @@ static int nvme_setup_host_mem(struct nvme_dev *dev) | |||
1853 | u64 preferred = (u64)dev->ctrl.hmpre * 4096; | 1853 | u64 preferred = (u64)dev->ctrl.hmpre * 4096; |
1854 | u64 min = (u64)dev->ctrl.hmmin * 4096; | 1854 | u64 min = (u64)dev->ctrl.hmmin * 4096; |
1855 | u32 enable_bits = NVME_HOST_MEM_ENABLE; | 1855 | u32 enable_bits = NVME_HOST_MEM_ENABLE; |
1856 | int ret = 0; | 1856 | int ret; |
1857 | 1857 | ||
1858 | preferred = min(preferred, max); | 1858 | preferred = min(preferred, max); |
1859 | if (min > max) { | 1859 | if (min > max) { |