lkml.org 
[lkml]   [2019]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86/platform/UV: Replace kmalloc and memset with kzalloc and kcalloc
From
Date


On 1/16/19 6:06 AM, Borislav Petkov wrote:

>> - vp = kmalloc_array(nuvhubs, sizeof(struct uvhub_desc), GFP_KERNEL);
>> - uvhub_descs = (struct uvhub_desc *)vp;
>> - memset(uvhub_descs, 0, nuvhubs * sizeof(struct uvhub_desc));
>> + uvhub_descs = kcalloc(nuvhubs, sizeof(*uvhub_descs), GFP_KERNEL);
> ^^^^^^^^^^^^^^^^^^^^
>
> I'm changing that back to sizeof(struct uvhub_desc) as it is clearer
> this way.
>

Okay.

Thanks, Boris.

--
Gustavo

\
 
 \ /
  Last update: 2019-01-23 00:09    [W:0.052 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site