Re: [PATCH] thermal/debugfs: replace kzalloc() with kcalloc() in thermal_debug_tz_add()

From: Lukasz Luba
Date: Mon Feb 24 2025 - 11:38:41 EST




On 2/22/25 20:02, Ethan Carter Edwards wrote:
We are trying to get rid of all multiplications from allocation
functions to prevent integer overflows[1]. Here the multiplication is
obviously safe, but using kcalloc() is more appropriate and improves
readability. This patch has no effect on runtime behavior.

Link: https://github.com/KSPP/linux/issues/162 [1]
Link: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments



IMO there is no need for such links in the patch header.
The explanation is enough. Just drop those two links
and should be good.

Thanks for the patch!

Regards,
Lukasz