linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/scsi/fnic/fnic_trace.c: Use vzalloc
@ 2018-11-13 15:08 Sabyasachi Gupta
  2018-11-13 15:44 ` John Garry
  0 siblings, 1 reply; 9+ messages in thread
From: Sabyasachi Gupta @ 2018-11-13 15:08 UTC (permalink / raw)
  To: satishkh, sebaddel, kartilak, jejb, martin.petersen
  Cc: jrdr.linux, linux-scsi, linux-kernel, brajeswar.linux

Replaced vmalloc + memset with vzalloc

Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
---
 drivers/scsi/fnic/fnic_trace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/fnic/fnic_trace.c b/drivers/scsi/fnic/fnic_trace.c
index 8271785..129ab27 100644
--- a/drivers/scsi/fnic/fnic_trace.c
+++ b/drivers/scsi/fnic/fnic_trace.c
@@ -468,14 +468,14 @@ int fnic_trace_buf_init(void)
 	fnic_max_trace_entries = (trace_max_pages * PAGE_SIZE)/
 					  FNIC_ENTRY_SIZE_BYTES;
 
-	fnic_trace_buf_p = (unsigned long)vmalloc((trace_max_pages * PAGE_SIZE));
+	fnic_trace_buf_p = (unsigned long)vzalloc((trace_max_pages *
+								PAGE_SIZE));
 	if (!fnic_trace_buf_p) {
 		printk(KERN_ERR PFX "Failed to allocate memory "
 				  "for fnic_trace_buf_p\n");
 		err = -ENOMEM;
 		goto err_fnic_trace_buf_init;
 	}
-	memset((void *)fnic_trace_buf_p, 0, (trace_max_pages * PAGE_SIZE));
 
 	fnic_trace_entries.page_offset =
 		vmalloc(array_size(fnic_max_trace_entries,
-- 
2.7.4


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

end of thread, other threads:[~2018-11-14 10:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 15:08 [PATCH] drivers/scsi/fnic/fnic_trace.c: Use vzalloc Sabyasachi Gupta
2018-11-13 15:44 ` John Garry
2018-11-13 15:53   ` Johannes Thumshirn
2018-11-13 16:04     ` Sabyasachi Gupta
2018-11-13 16:11     ` James Bottomley
2018-11-13 16:16       ` Johannes Thumshirn
2018-11-13 16:22         ` Sabyasachi Gupta
2018-11-13 16:25           ` Johannes Thumshirn
2018-11-14 10:44       ` David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).