From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/platform/UV: Replace kmalloc and memset with kzalloc and kcalloc
Date: Tue, 22 Jan 2019 17:08:34 -0600 [thread overview]
Message-ID: <941b300b-c1c7-ae50-33cf-1f5cee788360@embeddedor.com> (raw)
In-Reply-To: <20190116120647.GE15409@zn.tnic>
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
next prev parent reply other threads:[~2019-01-22 23:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 17:37 [PATCH] x86/platform/UV: Replace kmalloc and memset with kzalloc and kcalloc Gustavo A. R. Silva
2019-01-16 12:06 ` Borislav Petkov
2019-01-22 23:08 ` Gustavo A. R. Silva [this message]
2019-01-16 12:09 ` [tip:x86/cleanups] x86/platform/UV: Replace kmalloc() and memset() with k[cz]alloc() calls tip-bot for Gustavo A. R. Silva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=941b300b-c1c7-ae50-33cf-1f5cee788360@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).