* [PATCH] drivers/scsi/snic/snic_trc.c: Use vzalloc
@ 2018-11-15 16:34 Sabyasachi Gupta
2018-11-23 14:37 ` Sabyasachi Gupta
0 siblings, 1 reply; 4+ messages in thread
From: Sabyasachi Gupta @ 2018-11-15 16:34 UTC (permalink / raw)
To: kartilak, sebaddel, 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/snic/snic_trc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/snic/snic_trc.c b/drivers/scsi/snic/snic_trc.c
index fc60c93..458eaba 100644
--- a/drivers/scsi/snic/snic_trc.c
+++ b/drivers/scsi/snic/snic_trc.c
@@ -126,7 +126,7 @@ snic_trc_init(void)
int tbuf_sz = 0, ret;
tbuf_sz = (snic_trace_max_pages * PAGE_SIZE);
- tbuf = vmalloc(tbuf_sz);
+ tbuf = vzalloc(tbuf_sz);
if (!tbuf) {
SNIC_ERR("Failed to Allocate Trace Buffer Size. %d\n", tbuf_sz);
SNIC_ERR("Trace Facility not enabled.\n");
@@ -135,7 +135,6 @@ snic_trc_init(void)
return ret;
}
- memset(tbuf, 0, tbuf_sz);
trc->buf = (struct snic_trc_data *) tbuf;
spin_lock_init(&trc->lock);
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers/scsi/snic/snic_trc.c: Use vzalloc
2018-11-15 16:34 [PATCH] drivers/scsi/snic/snic_trc.c: Use vzalloc Sabyasachi Gupta
@ 2018-11-23 14:37 ` Sabyasachi Gupta
2018-12-05 4:33 ` Sabyasachi Gupta
0 siblings, 1 reply; 4+ messages in thread
From: Sabyasachi Gupta @ 2018-11-23 14:37 UTC (permalink / raw)
To: kartilak, sebaddel, jejb, martin.petersen
Cc: Souptick Joarder, linux-scsi, linux-kernel, Brajeswar Ghosh
On Thu, Nov 15, 2018 at 10:04 PM Sabyasachi Gupta
<sabyasachi.linux@gmail.com> wrote:
>
> Replaced vmalloc + memset with vzalloc
>
> Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
Any comment on this patch?
> ---
> drivers/scsi/snic/snic_trc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/snic/snic_trc.c b/drivers/scsi/snic/snic_trc.c
> index fc60c93..458eaba 100644
> --- a/drivers/scsi/snic/snic_trc.c
> +++ b/drivers/scsi/snic/snic_trc.c
> @@ -126,7 +126,7 @@ snic_trc_init(void)
> int tbuf_sz = 0, ret;
>
> tbuf_sz = (snic_trace_max_pages * PAGE_SIZE);
> - tbuf = vmalloc(tbuf_sz);
> + tbuf = vzalloc(tbuf_sz);
> if (!tbuf) {
> SNIC_ERR("Failed to Allocate Trace Buffer Size. %d\n", tbuf_sz);
> SNIC_ERR("Trace Facility not enabled.\n");
> @@ -135,7 +135,6 @@ snic_trc_init(void)
> return ret;
> }
>
> - memset(tbuf, 0, tbuf_sz);
> trc->buf = (struct snic_trc_data *) tbuf;
> spin_lock_init(&trc->lock);
>
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers/scsi/snic/snic_trc.c: Use vzalloc
2018-11-23 14:37 ` Sabyasachi Gupta
@ 2018-12-05 4:33 ` Sabyasachi Gupta
2018-12-05 6:28 ` Sesidhar Baddela (sebaddel)
0 siblings, 1 reply; 4+ messages in thread
From: Sabyasachi Gupta @ 2018-12-05 4:33 UTC (permalink / raw)
To: kartilak, sebaddel, jejb, martin.petersen
Cc: Souptick Joarder, linux-scsi, linux-kernel, Brajeswar Ghosh
On Fri, Nov 23, 2018 at 8:07 PM Sabyasachi Gupta
<sabyasachi.linux@gmail.com> wrote:
>
> On Thu, Nov 15, 2018 at 10:04 PM Sabyasachi Gupta
> <sabyasachi.linux@gmail.com> wrote:
> >
> > Replaced vmalloc + memset with vzalloc
> >
> > Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
>
> Any comment on this patch?
Any comment on this patch?
>
> > ---
> > drivers/scsi/snic/snic_trc.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/scsi/snic/snic_trc.c b/drivers/scsi/snic/snic_trc.c
> > index fc60c93..458eaba 100644
> > --- a/drivers/scsi/snic/snic_trc.c
> > +++ b/drivers/scsi/snic/snic_trc.c
> > @@ -126,7 +126,7 @@ snic_trc_init(void)
> > int tbuf_sz = 0, ret;
> >
> > tbuf_sz = (snic_trace_max_pages * PAGE_SIZE);
> > - tbuf = vmalloc(tbuf_sz);
> > + tbuf = vzalloc(tbuf_sz);
> > if (!tbuf) {
> > SNIC_ERR("Failed to Allocate Trace Buffer Size. %d\n", tbuf_sz);
> > SNIC_ERR("Trace Facility not enabled.\n");
> > @@ -135,7 +135,6 @@ snic_trc_init(void)
> > return ret;
> > }
> >
> > - memset(tbuf, 0, tbuf_sz);
> > trc->buf = (struct snic_trc_data *) tbuf;
> > spin_lock_init(&trc->lock);
> >
> > --
> > 2.7.4
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers/scsi/snic/snic_trc.c: Use vzalloc
2018-12-05 4:33 ` Sabyasachi Gupta
@ 2018-12-05 6:28 ` Sesidhar Baddela (sebaddel)
0 siblings, 0 replies; 4+ messages in thread
From: Sesidhar Baddela (sebaddel) @ 2018-12-05 6:28 UTC (permalink / raw)
To: Sabyasachi Gupta, Karan Tilak Kumar (kartilak), jejb, martin.petersen
Cc: Souptick Joarder, linux-scsi, linux-kernel, Brajeswar Ghosh
Looks good to me.
Acked-by: Sesidhar Baddela <sebaddel@cisco.com>
On 12/4/18, 8:33 PM, "Sabyasachi Gupta" <sabyasachi.linux@gmail.com> wrote:
On Fri, Nov 23, 2018 at 8:07 PM Sabyasachi Gupta
<sabyasachi.linux@gmail.com> wrote:
>
> On Thu, Nov 15, 2018 at 10:04 PM Sabyasachi Gupta
> <sabyasachi.linux@gmail.com> wrote:
> >
> > Replaced vmalloc + memset with vzalloc
> >
> > Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
>
> Any comment on this patch?
Any comment on this patch?
>
> > ---
> > drivers/scsi/snic/snic_trc.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/scsi/snic/snic_trc.c b/drivers/scsi/snic/snic_trc.c
> > index fc60c93..458eaba 100644
> > --- a/drivers/scsi/snic/snic_trc.c
> > +++ b/drivers/scsi/snic/snic_trc.c
> > @@ -126,7 +126,7 @@ snic_trc_init(void)
> > int tbuf_sz = 0, ret;
> >
> > tbuf_sz = (snic_trace_max_pages * PAGE_SIZE);
> > - tbuf = vmalloc(tbuf_sz);
> > + tbuf = vzalloc(tbuf_sz);
> > if (!tbuf) {
> > SNIC_ERR("Failed to Allocate Trace Buffer Size. %d\n", tbuf_sz);
> > SNIC_ERR("Trace Facility not enabled.\n");
> > @@ -135,7 +135,6 @@ snic_trc_init(void)
> > return ret;
> > }
> >
> > - memset(tbuf, 0, tbuf_sz);
> > trc->buf = (struct snic_trc_data *) tbuf;
> > spin_lock_init(&trc->lock);
> >
> > --
> > 2.7.4
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-12-05 6:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15 16:34 [PATCH] drivers/scsi/snic/snic_trc.c: Use vzalloc Sabyasachi Gupta
2018-11-23 14:37 ` Sabyasachi Gupta
2018-12-05 4:33 ` Sabyasachi Gupta
2018-12-05 6:28 ` Sesidhar Baddela (sebaddel)
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).