Re: [PATCH 1/2] ASoC: Intel: atom: Replace deprecated strcpy in sst_slot_enum_info

From: Cezary Rojewski

Date: Wed Nov 12 2025 - 06:44:13 EST




On 2025-11-11 11:47 PM, Thorsten Blum wrote:
strcpy() is deprecated; use the safer strscpy() instead.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
---
sound/soc/intel/atom/sst-atom-controls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/atom/sst-atom-controls.c b/sound/soc/intel/atom/sst-atom-controls.c
index 38116c758717..799d4f0881e3 100644
--- a/sound/soc/intel/atom/sst-atom-controls.c
+++ b/sound/soc/intel/atom/sst-atom-controls.c
@@ -142,7 +142,7 @@ static int sst_slot_enum_info(struct snd_kcontrol *kcontrol,
if (uinfo->value.enumerated.item > e->max - 1)
uinfo->value.enumerated.item = e->max - 1;
- strcpy(uinfo->value.enumerated.name,
+ strscpy(uinfo->value.enumerated.name,
e->texts[uinfo->value.enumerated.item]);
return 0;

If you go for one-patch approach as suggested by me in the PATCH 2/2 review, the title should be: 'ASoC: Intel: atom: Replace strcpy() with strscpy()'

For this patch, both for v1 and v2 (if any):

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