]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
firmware: cs_dsp: Remove unused struct list_head from cs_dsp_coeff_ctl
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Mon, 16 Jun 2025 10:30:52 +0000 (11:30 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 16 Jun 2025 12:26:44 +0000 (13:26 +0100)
commite7af416aebb36e6681b9c6950d0f6352aee7c084
treefa58240e35049b82fa95572f6c265f739eb45d38
parent000d8b9420c09a42271310c9785e42a229cb069a
firmware: cs_dsp: Remove unused struct list_head from cs_dsp_coeff_ctl

Remove two unused pointers from struct cs_dsp_coeff_ctl by taking the
struct list_head out of struct cs_dsp_alg_region. On a x86_64 build
this saves 16 bytes per control.

Each cs_dsp_coeff_ctl instance needs to keep information about the
algorithm region it refers to. This is done by embedding an instance
of struct cs_dsp_alg_region. But cs_dsp_alg_region was also used to
store entries in a list of algorithm regions, and so had a struct
list_head object for that purpose. This list_head object is not used
with the embedded object in struct cs_dsp_alg_region so was just
wasted bytes.

A new struct cs_dsp_alg_region_list_item has been defined for creating
the list of algorithm regions. It contains a struct cs_dsp_alg_region
and a struct list_head.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250616103052.66537-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