Re: [PATCH] crypto: caam - switch to use devm_kmemdup_array()

From: Christophe JAILLET
Date: Tue Jul 22 2025 - 13:05:26 EST


Le 21/07/2025 à 04:06, zhang.enpei@xxxxxxxxxx a écrit :
Thanks for the review!
devm_kmemdup_array() will call size_mul() to combine its third and fourth parameters into
length for devm_kmemdup(). So keep the same value sizeof(data->clks[0]) here as before.



sizeof(data->clks[0]) and sizeof(*data->clks) are the same.

But the second version is the preferred style. See [1].

So while touching these lines of code, updating the style looked a good idea to me.

CJ


[1]: https://docs.kernel.org/6.15/process/coding-style.html#allocating-memory