All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-pci: remove an unnecessary variable initialization in HMB code
@ 2017-12-03  5:37 Minwoo Im
  2017-12-03  5:56 ` Minwoo Im
  0 siblings, 1 reply; 4+ messages in thread
From: Minwoo Im @ 2017-12-03  5:37 UTC (permalink / raw)


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 at gmail.com>
---
 drivers/nvme/host/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index f5800c3..9f7993b 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,
 	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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-04 20:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-03  5:37 [PATCH] nvme-pci: remove an unnecessary variable initialization in HMB code Minwoo Im
2017-12-03  5:56 ` Minwoo Im
2017-12-04 20:11   ` Christoph Hellwig
2017-12-04 20:19     ` Minwoo Im

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.