* [PATCH 2/2] nvme: pci: remove unnecessary initialization of local variable
@ 2018-01-14 11:40 Minwoo Im
2018-01-15 2:01 ` Keith Busch
0 siblings, 1 reply; 3+ messages in thread
From: Minwoo Im @ 2018-01-14 11:40 UTC (permalink / raw)
No functional change with code clean-up.
Remove unnecessary initialization of local variable in HMB code.
Signed-off-by: Minwoo Im <minwoo.im.dev at gmail.com>
---
drivers/nvme/host/pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index fb392c5..3abe12c 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1768,7 +1768,7 @@ static int __nvme_alloc_host_mem(struct nvme_dev *dev, u64 preferred,
dma_addr_t descs_dma;
int i = 0;
void **bufs;
- u64 size = 0, tmp;
+ u64 size, tmp;
tmp = (preferred + chunk_size - 1);
do_div(tmp, chunk_size);
@@ -1851,7 +1851,7 @@ static int nvme_setup_host_mem(struct nvme_dev *dev)
u64 preferred = (u64)dev->ctrl.hmpre * SZ_4K;
u64 min = (u64)dev->ctrl.hmmin * SZ_4K;
u32 enable_bits = NVME_HOST_MEM_ENABLE;
- int ret = 0;
+ int ret;
preferred = min(preferred, max);
if (min > max) {
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] nvme: pci: remove unnecessary initialization of local variable
2018-01-14 11:40 [PATCH 2/2] nvme: pci: remove unnecessary initialization of local variable Minwoo Im
@ 2018-01-15 2:01 ` Keith Busch
2018-01-17 13:08 ` Minwoo Im
0 siblings, 1 reply; 3+ messages in thread
From: Keith Busch @ 2018-01-15 2:01 UTC (permalink / raw)
On Sun, Jan 14, 2018@08:40:55PM +0900, Minwoo Im wrote:
> No functional change with code clean-up.
> Remove unnecessary initialization of local variable in HMB code.
Looks fine.
Reviewed-by: Keith Busch <keith.busch at intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] nvme: pci: remove unnecessary initialization of local variable
2018-01-15 2:01 ` Keith Busch
@ 2018-01-17 13:08 ` Minwoo Im
0 siblings, 0 replies; 3+ messages in thread
From: Minwoo Im @ 2018-01-17 13:08 UTC (permalink / raw)
On Mon, Jan 15, 2018@11:01 AM, Keith Busch <keith.busch@intel.com> wrote:
> On Sun, Jan 14, 2018@08:40:55PM +0900, Minwoo Im wrote:
>> No functional change with code clean-up.
>> Remove unnecessary initialization of local variable in HMB code.
>
> Looks fine.
>
> Reviewed-by: Keith Busch <keith.busch at intel.com>
If don't mind, ping ?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-17 13:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-14 11:40 [PATCH 2/2] nvme: pci: remove unnecessary initialization of local variable Minwoo Im
2018-01-15 2:01 ` Keith Busch
2018-01-17 13:08 ` Minwoo Im
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox