Re: [PATCH 13/15] ASoC: ops: Factor out common code from get callbacks

From: Charles Keepax
Date: Wed Mar 19 2025 - 12:06:16 EST


On Wed, Mar 19, 2025 at 03:12:56PM +0000, Mark Brown wrote:
> On Tue, Mar 18, 2025 at 05:14:57PM +0000, Charles Keepax wrote:
> > There are only two differences between snd_soc_get_volsw() and
> > snd_soc_get_volsw_sx(). The maximum field is handled differently, and
> > snd_soc_get_volsw() supports double controls with both values in the
> > same register.
>
> This breaks an x86 allmodconfig build:
>
> /build/stage/linux/sound/soc/soc-ops.c: In function ‘snd_soc_get_volsw_sx’:
> /build/stage/linux/sound/soc/soc-ops.c:374:22: error: unused variable ‘reg2’ [-W
> error=unused-variable]
> 374 | unsigned int reg2 = mc->rreg;
> | ^~~~
> /build/stage/linux/sound/soc/soc-ops.c:373:22: error: unused variable ‘reg’ [-We
> rror=unused-variable]
> 373 | unsigned int reg = mc->reg;
> | ^~~
> cc1: all warnings being treated as errors
>
> Please ensure your serieses are bisectable.

Sorry those do get cleaned up in the next patch but will respin
to move them into this patch, must have got muddled in the rebase
at some point.

Thanks,
Charles