From: Markus Elfring <Markus.Elfring@web.de>
To: Ethan Carter Edwards <ethan@ethancedwards.com>,
linux-pm@vger.kernel.org, linux-hardening@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Lukasz Luba <lukasz.luba@arm.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Zhang Rui <rui.zhang@intel.com>
Subject: Re: [PATCH v4?] thermal/debugfs: replace kzalloc() with kcalloc() in thermal_debug_tz_add()
Date: Sun, 23 Feb 2025 11:11:35 +0100 [thread overview]
Message-ID: <ebe9e9d5-2058-429e-b733-183c437ba154@web.de> (raw)
In-Reply-To: <20250222-thermal_kcalloc-v1-1-9f7a747fbed7@ethancedwards.com>
…
> We are trying to get rid of all multiplications from allocation
> functions to prevent integer overflows[1]. …
Is an imperative wording more desirable for such a change description?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.14-rc3#n94
…
> ---
> drivers/thermal/thermal_debugfs.c | 2 +-
…
How do you think about to improve your version management?
https://lore.kernel.org/all/?q=%22This+looks+like+a+new+version+of+a+previously+submitted+patch%22
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.14-rc3#n780
…
> +++ b/drivers/thermal/thermal_debugfs.c
> @@ -876,7 +876,7 @@ void thermal_debug_tz_add(struct thermal_zone_device *tz)
>
> tz_dbg->tz = tz;
>
> - tz_dbg->trips_crossed = kzalloc(sizeof(int) * tz->num_trips, GFP_KERNEL);
> + tz_dbg->trips_crossed = kcalloc(tz->num_trips, sizeof(int), GFP_KERNEL);
…
See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.14-rc3#n941
Regards,
Markus
next prev parent reply other threads:[~2025-02-23 10:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-22 20:02 [PATCH] " Ethan Carter Edwards
2025-02-23 10:11 ` Markus Elfring [this message]
2025-02-24 16:37 ` Lukasz Luba
2025-02-26 19:49 ` Rafael J. Wysocki
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=ebe9e9d5-2058-429e-b733-183c437ba154@web.de \
--to=markus.elfring@web.de \
--cc=daniel.lezcano@linaro.org \
--cc=ethan@ethancedwards.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.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®