[PATCH 1/6] ASoC: qcom: audioreach: Drop unused audioreach_control_load_mix() arguments

Krzysztof Kozlowski posted 6 patches 2 days, 8 hours ago
[PATCH 1/6] ASoC: qcom: audioreach: Drop unused audioreach_control_load_mix() arguments
Posted by Krzysztof Kozlowski 2 days, 8 hours ago
Simplify the audioreach_control_load_mix() function by removing its
unused arguments.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 sound/soc/qcom/qdsp6/topology.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sound/soc/qcom/qdsp6/topology.c b/sound/soc/qcom/qdsp6/topology.c
index 5ce6edf3305e..5d138a956ca8 100644
--- a/sound/soc/qcom/qdsp6/topology.c
+++ b/sound/soc/qcom/qdsp6/topology.c
@@ -1203,9 +1203,7 @@ static int audioreach_put_vol_ctrl_audio_mixer(struct snd_kcontrol *kcontrol,
 	return 1;
 }
 
-static int audioreach_control_load_mix(struct snd_soc_component *scomp,
-				       struct snd_ar_control *scontrol,
-				       struct snd_kcontrol_new *kc,
+static int audioreach_control_load_mix(struct snd_ar_control *scontrol,
 				       struct snd_soc_tplg_ctl_hdr *hdr)
 {
 	struct snd_soc_tplg_vendor_value_elem *c_elem;
@@ -1256,7 +1254,7 @@ static int audioreach_control_load(struct snd_soc_component *scomp, int index,
 	case SND_SOC_AR_TPLG_FE_BE_GRAPH_CTL_MIX:
 		sm = (struct soc_mixer_control *)kc->private_value;
 		dobj = &sm->dobj;
-		ret = audioreach_control_load_mix(scomp, scontrol, kc, hdr);
+		ret = audioreach_control_load_mix(scontrol, hdr);
 		break;
 	case SND_SOC_AR_TPLG_VOL_CTL:
 		sm = (struct soc_mixer_control *)kc->private_value;

-- 
2.48.1
Re: [PATCH 1/6] ASoC: qcom: audioreach: Drop unused audioreach_control_load_mix() arguments
Posted by Srinivas Kandagatla 7 hours ago

On 11/29/25 2:02 PM, Krzysztof Kozlowski wrote:
> Simplify the audioreach_control_load_mix() function by removing its
> unused arguments.

TBH, this is an unnecessary cleanup.

There are 1000+ of such instances in all over the kernel, if we audit this.

Functions will have more arguments than that gets used in the
implementations for various reasons, consistency, future use etc..

I dont see any point in this type of cleanups.


--srini>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
>  sound/soc/qcom/qdsp6/topology.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/soc/qcom/qdsp6/topology.c b/sound/soc/qcom/qdsp6/topology.c
> index 5ce6edf3305e..5d138a956ca8 100644
> --- a/sound/soc/qcom/qdsp6/topology.c
> +++ b/sound/soc/qcom/qdsp6/topology.c
> @@ -1203,9 +1203,7 @@ static int audioreach_put_vol_ctrl_audio_mixer(struct snd_kcontrol *kcontrol,
>  	return 1;
>  }
>  
> -static int audioreach_control_load_mix(struct snd_soc_component *scomp,
> -				       struct snd_ar_control *scontrol,
> -				       struct snd_kcontrol_new *kc,
> +static int audioreach_control_load_mix(struct snd_ar_control *scontrol,
>  				       struct snd_soc_tplg_ctl_hdr *hdr)
>  {
>  	struct snd_soc_tplg_vendor_value_elem *c_elem;
> @@ -1256,7 +1254,7 @@ static int audioreach_control_load(struct snd_soc_component *scomp, int index,
>  	case SND_SOC_AR_TPLG_FE_BE_GRAPH_CTL_MIX:
>  		sm = (struct soc_mixer_control *)kc->private_value;
>  		dobj = &sm->dobj;
> -		ret = audioreach_control_load_mix(scomp, scontrol, kc, hdr);
> +		ret = audioreach_control_load_mix(scontrol, hdr);
>  		break;
>  	case SND_SOC_AR_TPLG_VOL_CTL:
>  		sm = (struct soc_mixer_control *)kc->private_value;
>