From: Steven Rostedt <rostedt@goodmis.org>
To: Fushuai Wang <fushuai.wang@linux.dev>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
bsegall@google.com, mgorman@suse.de, vschneid@redhat.com,
linux-kernel@vger.kernel.org, wangfushuai@baidu.com
Subject: Re: [PATCH RESEND] sched/topology: Convert kzalloc() to kcalloc() in topology.c
Date: Wed, 17 Dec 2025 11:24:03 -0500 [thread overview]
Message-ID: <20251217112403.21df7955@gandalf.local.home> (raw)
In-Reply-To: <20251217130545.66489-1-fushuai.wang@linux.dev>
On Wed, 17 Dec 2025 21:05:45 +0800
Fushuai Wang <fushuai.wang@linux.dev> wrote:
> @@ -2096,7 +2096,7 @@ void sched_init_numa(int offline_node)
> /* Compute default topology size */
> for (i = 0; sched_domain_topology[i].mask; i++);
>
> - tl = kzalloc((i + nr_levels + 1) *
> + tl = kcalloc((i + nr_levels + 1),
> sizeof(struct sched_domain_topology_level), GFP_KERNEL);
I like the conversion, but here you can lose the parenthesis:
tl = kcalloc(i + nr_levels + 1,
sizeof(struct sched_domain_topology_level), GFP_KERNEL);
-- Steve
> if (!tl)
> return;
prev parent reply other threads:[~2025-12-17 16:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 13:05 Fushuai Wang
2025-12-17 16:24 ` Steven Rostedt [this message]
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=20251217112403.21df7955@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=fushuai.wang@linux.dev \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=wangfushuai@baidu.com \
/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
all inboxes | Powered by JetHome®