]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
firmware: cs_dsp: Use kvzalloc() to allocate control caches
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Thu, 27 Nov 2025 10:39:47 +0000 (10:39 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 27 Nov 2025 11:41:23 +0000 (11:41 +0000)
commitc45d5d9803a4fb7d3e7f590094b7a2abcfe74ef6
tree83a41fc0719955a8bd288c2841cf7f9d12a83341
parented6e90cb9fe53aba4750be50c1a355d676b7d69c
firmware: cs_dsp: Use kvzalloc() to allocate control caches

Use kvzalloc() instead of kzalloc() to allocate memory to cache the
content of a firmware control.

Most firmware controls are only small, typically a few bytes. But on
some firmware there can be much larger controls for coefficient or
model data.

The overhead of kvzalloc() is negligible because most control allocs
can be satisfied by the normal kmalloc() that kvzalloc() will try first.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127103947.1094934-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/firmware/cirrus/cs_dsp.c