Messages in this thread | ![/](/images/icornerl.gif) | | Subject | Re: [PATCH] x86/platform/UV: Replace kmalloc and memset with kzalloc and kcalloc | From | "Gustavo A. R. Silva" <> | Date | Tue, 22 Jan 2019 17:08:34 -0600 |
| |
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
| ![\](/images/icornerr.gif) |