linux-sound.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: intel-hdmi-audio: Replace deprecated strcpy() with strscpy()
@ 2025-05-09 16:29 Thorsten Blum
  2025-05-11 14:25 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2025-05-09 16:29 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Andi Shyti, Rodrigo Vivi,
	Jani Nikula, Lucas De Marchi
  Cc: Thorsten Blum, Takashi Iwai, linux-sound, linux-kernel

strcpy() is deprecated; use strscpy() instead.

No functional changes intended.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 sound/x86/intel_hdmi_audio.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index 7fcc528a0204..fe5cb4139088 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -22,6 +22,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/dma-mapping.h>
 #include <linux/delay.h>
+#include <linux/string.h>
 #include <sound/core.h>
 #include <sound/asoundef.h>
 #include <sound/pcm.h>
@@ -1698,9 +1699,9 @@ static int __hdmi_lpe_audio_probe(struct platform_device *pdev)
 	card_ctx = card->private_data;
 	card_ctx->dev = &pdev->dev;
 	card_ctx->card = card;
-	strcpy(card->driver, INTEL_HAD);
-	strcpy(card->shortname, "Intel HDMI/DP LPE Audio");
-	strcpy(card->longname, "Intel HDMI/DP LPE Audio");
+	strscpy(card->driver, INTEL_HAD);
+	strscpy(card->shortname, "Intel HDMI/DP LPE Audio");
+	strscpy(card->longname, "Intel HDMI/DP LPE Audio");
 
 	card_ctx->irq = -1;
 
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: intel-hdmi-audio: Replace deprecated strcpy() with strscpy()
  2025-05-09 16:29 [PATCH] ALSA: intel-hdmi-audio: Replace deprecated strcpy() with strscpy() Thorsten Blum
@ 2025-05-11 14:25 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2025-05-11 14:25 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: Jaroslav Kysela, Takashi Iwai, Andi Shyti, Rodrigo Vivi,
	Jani Nikula, Lucas De Marchi, Takashi Iwai, linux-sound,
	linux-kernel

On Fri, 09 May 2025 18:29:28 +0200,
Thorsten Blum wrote:
> 
> strcpy() is deprecated; use strscpy() instead.
> 
> No functional changes intended.
> 
> Link: https://github.com/KSPP/linux/issues/88
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

Thanks, applied now.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-11 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-09 16:29 [PATCH] ALSA: intel-hdmi-audio: Replace deprecated strcpy() with strscpy() Thorsten Blum
2025-05-11 14:25 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).