[PATCH] ASoC: Intel: avs: da7219: Remove redundant DAI link name allocation

Linmao Li posted 1 patch 1 day, 11 hours ago
sound/soc/intel/avs/boards/da7219.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] ASoC: Intel: avs: da7219: Remove redundant DAI link name allocation
Posted by Linmao Li 1 day, 11 hours ago
avs_create_dai_link() assigns dl->name twice; the first devm_kasprintf()
is immediately overwritten by the TDM-aware name. Drop the redundant
first assignment.

Signed-off-by: Linmao Li <lilinmao@kylinos.cn>
---
 sound/soc/intel/avs/boards/da7219.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/intel/avs/boards/da7219.c b/sound/soc/intel/avs/boards/da7219.c
index 2b17abcbd2bc..6cc8a6618fa1 100644
--- a/sound/soc/intel/avs/boards/da7219.c
+++ b/sound/soc/intel/avs/boards/da7219.c
@@ -175,7 +175,6 @@ static int avs_create_dai_link(struct device *dev, int ssp_port, int tdm_slot,
 	if (!dl || !platform)
 		return -ENOMEM;
 
-	dl->name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-Codec", ssp_port);
 	dl->name = devm_kasprintf(dev, GFP_KERNEL,
 				  AVS_STRING_FMT("SSP", "-Codec", ssp_port, tdm_slot));
 	dl->cpus = devm_kzalloc(dev, sizeof(*dl->cpus), GFP_KERNEL);
-- 
2.25.1
Re: [PATCH] ASoC: Intel: avs: da7219: Remove redundant DAI link name allocation
Posted by Cezary Rojewski 1 day, 10 hours ago
On 7/23/2026 11:36 AM, Linmao Li wrote:
> avs_create_dai_link() assigns dl->name twice; the first devm_kasprintf()
> is immediately overwritten by the TDM-aware name. Drop the redundant
> first assignment.
> 
> Signed-off-by: Linmao Li <lilinmao@kylinos.cn>
> ---
>   sound/soc/intel/avs/boards/da7219.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/sound/soc/intel/avs/boards/da7219.c b/sound/soc/intel/avs/boards/da7219.c
> index 2b17abcbd2bc..6cc8a6618fa1 100644
> --- a/sound/soc/intel/avs/boards/da7219.c
> +++ b/sound/soc/intel/avs/boards/da7219.c
> @@ -175,7 +175,6 @@ static int avs_create_dai_link(struct device *dev, int ssp_port, int tdm_slot,
>   	if (!dl || !platform)
>   		return -ENOMEM;
>   
> -	dl->name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-Codec", ssp_port);
>   	dl->name = devm_kasprintf(dev, GFP_KERNEL,
>   				  AVS_STRING_FMT("SSP", "-Codec", ssp_port, tdm_slot));
>   	dl->cpus = devm_kzalloc(dev, sizeof(*dl->cpus), GFP_KERNEL);

FWIW I've scanned the series [1] which introduced the issue. Looks like 
this is the only offending line. Thank you for addressing it:

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>


[1]: 
https://lore.kernel.org/all/20231012083514.492626-1-amadeuszx.slawinski@linux.intel.com/