lkml.org 
[lkml]   [2018]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] drivers/scsi/snic/snic_trc.c: Use vzalloc
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
> >

\
 
 \ /
  Last update: 2018-12-05 05:34    [W:0.069 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site