Re: [PATCH] crypto: axis/artpec6: change from kzalloc to kcalloc in artpec6_crypto_probe()

From: Herbert Xu
Date: Sat Mar 15 2025 - 05:17:59 EST


On Sat, Mar 08, 2025 at 07:30:52PM -0500, Ethan Carter Edwards wrote:
> We are trying to get rid of all multiplications from allocation
> functions to prevent potential integer overflows. Here the
> multiplication is probably 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
>
> Signed-off-by: Ethan Carter Edwards <ethan@xxxxxxxxxxxxxxxxx>
> ---
> drivers/crypto/axis/artpec6_crypto.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt