All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hrtimer: Replace deprecated strcpy() with strscpy()
@ 2025-06-30 10:57 Thorsten Blum
  2025-06-30 12:08 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2025-06-30 10:57 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Nam Cao, Zack Rusin
  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/core/hrtimer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/core/hrtimer.c b/sound/core/hrtimer.c
index e9c60dce59fb..c364bd126ac8 100644
--- a/sound/core/hrtimer.c
+++ b/sound/core/hrtimer.c
@@ -6,6 +6,7 @@
 
 #include <linux/init.h>
 #include <linux/slab.h>
+#include <linux/string.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/hrtimer.h>
@@ -138,7 +139,7 @@ static int __init snd_hrtimer_init(void)
 		return err;
 
 	timer->module = THIS_MODULE;
-	strcpy(timer->name, "HR timer");
+	strscpy(timer->name, "HR timer");
 	timer->hw = hrtimer_hw;
 	timer->hw.resolution = resolution;
 	timer->hw.ticks = NANO_SEC / resolution;
-- 
2.49.0


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

* Re: [PATCH] ALSA: hrtimer: Replace deprecated strcpy() with strscpy()
  2025-06-30 10:57 [PATCH] ALSA: hrtimer: Replace deprecated strcpy() with strscpy() Thorsten Blum
@ 2025-06-30 12:08 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2025-06-30 12:08 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: Jaroslav Kysela, Takashi Iwai, Nam Cao, Zack Rusin, Takashi Iwai,
	linux-sound, linux-kernel

On Mon, 30 Jun 2025 12:57:22 +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>

Applied now.  Thanks.


Takashi

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

end of thread, other threads:[~2025-06-30 12:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-30 10:57 [PATCH] ALSA: hrtimer: Replace deprecated strcpy() with strscpy() Thorsten Blum
2025-06-30 12:08 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.