lkml.org 
[lkml]   [2018]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/4] driver/scsi/fnic/fnic_trace: Use vzalloc to zero instead of vmalloc+memset
On Wed, Aug 1, 2018 at 4:26 PM, zhong jiang <zhongjiang@huawei.com> wrote:
> The vzalloc is better than vmalloc+memset, so replace them to make
> the code concise.

> - fnic_trace_buf_p = (unsigned long)vmalloc((trace_max_pages * PAGE_SIZE));
> + fnic_trace_buf_p = (unsigned long)vzalloc((trace_max_pages * PAGE_SIZE));

At the same time you may get rid of unnecessary parens.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2018-08-01 17:31    [W:0.143 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site