From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-188.mta0.migadu.com (out-188.mta0.migadu.com [91.218.175.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2769428F505 for ; Tue, 10 Jun 2025 12:19:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749557958; cv=none; b=RIC1T158f6k5pw0jZOqrPLw+B9xMXZ0sWP4LzfQEhN3IXyVH7vEdUMvA94ckJMbixiHGpcrUobQB0QaHAusxNTXTrP6dlZfsN4NKm+7/4EMFH/qzMA31MCuZihGeG9RiI+xaSuVqgjvVcXsrJaLt/y8pp+OaC7/Je2f5Yj1jWB0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749557958; c=relaxed/simple; bh=1TdCJVE90zc0uyWujCuswdWM8W/ne8tamClZI14mU+E=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=B//QecgThm1qHNmGB9Vwi0+XHE3YQ3cPLQXx0nPTlpe4KEW4GTASPPbOKLJwP4EjZaw5SNn1BkB11Xg3jER5oSzObaG0w5MWZn0debg2nKOqN2uh8HFAVI7P5vGH1ji8J5Qz1vGyWhi8oM1FZITW6VsovilxXiFXz77RvIfR24I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=VsIkrWmG; arc=none smtp.client-ip=91.218.175.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="VsIkrWmG" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1749557943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=YUwa1ViRWulotG3v7RHXQ5HOR2NEuBqQc72Nd6jY0H4=; b=VsIkrWmGB5orYIpgBr//Td/JFwFBSYO/Ae8YRUZuOP6+A8qMRyilZ13SHGCIrZK3hnfOc6 0DY8vuuTLC0zeIk/7RwYynJXvYVly65vcbo91NkIrTMcvueqAdPdtrEQ0DHcpuh38A4Jbe FrG+/onZjg/oJs277tYlHuxyw1gexvU= From: Thorsten Blum To: Jaroslav Kysela , Takashi Iwai , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Cc: Thorsten Blum , Takashi Iwai , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ALSA: mips/sgio2audio: Replace deprecated strcpy() with strscpy() Date: Tue, 10 Jun 2025 14:18:33 +0200 Message-ID: <20250610121835.2908-2-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT strcpy() is deprecated; use strscpy() instead. No functional changes intended. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum --- sound/mips/sgio2audio.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sound/mips/sgio2audio.c b/sound/mips/sgio2audio.c index 4e2ff954ff59..1af177f25c68 100644 --- a/sound/mips/sgio2audio.c +++ b/sound/mips/sgio2audio.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -685,7 +686,7 @@ static int snd_sgio2audio_new_pcm(struct snd_sgio2audio *chip) return err; pcm->private_data = chip; - strcpy(pcm->name, "SGI O2 DAC1"); + strscpy(pcm->name, "SGI O2 DAC1"); /* set operators */ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, @@ -700,7 +701,7 @@ static int snd_sgio2audio_new_pcm(struct snd_sgio2audio *chip) return err; pcm->private_data = chip; - strcpy(pcm->name, "SGI O2 DAC2"); + strscpy(pcm->name, "SGI O2 DAC2"); /* set operators */ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, @@ -892,8 +893,8 @@ static int snd_sgio2audio_probe(struct platform_device *pdev) return err; } - strcpy(card->driver, "SGI O2 Audio"); - strcpy(card->shortname, "SGI O2 Audio"); + strscpy(card->driver, "SGI O2 Audio"); + strscpy(card->shortname, "SGI O2 Audio"); sprintf(card->longname, "%s irq %i-%i", card->shortname, MACEISA_AUDIO1_DMAT_IRQ, -- 2.49.0