]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
firmware: cs_dsp: Store control length as 32-bit
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Mon, 24 Nov 2025 17:15:35 +0000 (17:15 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 24 Nov 2025 19:15:19 +0000 (19:15 +0000)
commit7584edf15892e29190b2145294cc1680aa142586
tree922097487bcfb7c2b9fdf4a1898554f4aaf4393e
parent172e22180212092b2aecac172ede3d07c013e22f
firmware: cs_dsp: Store control length as 32-bit

The architectures supported by this driver have a maximum of 32-bits
of address, so we don't need more than 32-bits to store the length of
control data. Change the length in struct cs_dsp_coeff_ctl to an
unsigned int instead of a size_t. Also make a corresponding trivial
change to wm_adsp.c to prevent a compiler warning.

Tested on x86_64 builds this saves at least 4 bytes per control
(another 4 bytes might be saved if the compiler was inserting padding
to align the size_t).

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251124171536.78962-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/firmware/cirrus/cs_dsp.c
include/linux/firmware/cirrus/cs_dsp.h
sound/soc/codecs/wm_adsp.c