Re: [PATCH v2 08/11] ASoC: SDCA: make find_sdca_control_reset() return void
From: Pierre-Louis Bossart
Date: Mon Sep 07 2026 - 07:44:40 EST
On 9/7/26 10:37, Srinivas Kandagatla wrote:
> find_sdca_control_reset() only ever returns 0 -- it just sets
> control->has_reset / control->reset for the framework-known
> (entity type, control selector) mappings. The int return + caller
> error check in find_sdca_entity_control() are dead code.
>
> Convert to void and drop the check. No functional change.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxxxxxxxx>
That looks also unrelated to DT stuff, not sure it belongs here as patch
08/11
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxx>
> ---
> sound/soc/sdca/sdca_functions.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/sound/soc/sdca/sdca_functions.c b/sound/soc/sdca/sdca_functions.c
> index 25f95575c731..68a50552f4e4 100644
> --- a/sound/soc/sdca/sdca_functions.c
> +++ b/sound/soc/sdca/sdca_functions.c
> @@ -922,8 +922,8 @@ static int find_sdca_control_value(struct device *dev, struct sdca_entity *entit
> return 0;
> }
>
> -static int find_sdca_control_reset(const struct sdca_entity *entity,
> - struct sdca_control *control)
> +static void find_sdca_control_reset(const struct sdca_entity *entity,
> + struct sdca_control *control)
> {
> switch (SDCA_CTL_TYPE(entity->type, control->sel)) {
> case SDCA_CTL_TYPE_S(FU, AGC):
> @@ -950,8 +950,6 @@ static int find_sdca_control_reset(const struct sdca_entity *entity,
> default:
> break;
> }
> -
> - return 0;
> }
>
> static int find_sdca_entity_control(struct device *dev, struct sdca_entity *entity,
> @@ -1032,9 +1030,7 @@ static int find_sdca_entity_control(struct device *dev, struct sdca_entity *enti
>
> control->is_volatile = find_sdca_control_volatile(entity, control);
>
> - ret = find_sdca_control_reset(entity, control);
> - if (ret)
> - return ret;
> + find_sdca_control_reset(entity, control);
>
> ret = find_sdca_control_range(dev, control_node, &control->range);
> if (ret) {