[PATCH v2 0/3] Tidy up ASoC control get and put handlers

From: Charles Keepax
Date: Wed Mar 19 2025 - 13:51:47 EST


There is a lot of duplicated and occasionally slightly incorrect code
around the ASoC control get and put handlers. This series add some kunit
tests and then refactors the code to get all the tests passing and
reduce some of the duplication. The focus here is on the volsw handlers,
future work could still be done on some of the others but these were the
ones that most required attention.

Hopefully the only slightly controversal change is the very last patch
which changes platform_max to be applied after the control type is
determined, more discussion in the commit message for that one.

Thanks,
Charles

Changes since v1:
- Drop already applied patches
- Move dropping of a couple of local variables from one patch to
another to avoid a build warning

Charles Keepax (3):
ASoC: ops: Factor out common code from get callbacks
ASoC: ops: Remove some unnecessary local variables
ASoC: ops: Apply platform_max after deciding control type

sound/soc/soc-ops.c | 116 +++++++++++++++++++-------------------------
1 file changed, 49 insertions(+), 67 deletions(-)

--
2.39.5