]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: Intel: avs: Replace devm_kzalloc() with
authorMark Brown <broonie@kernel.org>
Tue, 18 Mar 2025 15:34:29 +0000 (15:34 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 18 Mar 2025 15:34:29 +0000 (15:34 +0000)
Merge series from Ethan Carter Edwards <ethan@ethancedwards.com>:

Open coded arithmetic in allocator arguments is discouraged. Helper
functions like kcalloc or, in this case, devm_kcalloc are preferred. Not
only for readability purposes but safety purposes.

The changes move `devm_kzalloc(dev, sizeof(var) * n, GFP_KERNEL)` to
the helper function `devm_kcalloc(dev, n, sizeof(var), GFP_KERNEL)`.

Here is a series of four patches within the Intel/avs drivers that make
these changes. They are all compile tested only but should have no
effect on runtime behaviour.

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

Trivial merge