Linux Sound subsystem development
 help / color / mirror / Atom feed
From: HariKrishna Sagala <hariconscious@gmail.com>
To: Shuah Khan <skhan@linuxfoundation.org>,
	hariconscious@gmail.com,  shengjiu.wang@gmail.com,
	Xiubo.Lee@gmail.com, festevam@gmail.com,  nicoleotsuka@gmail.com,
	lgirdwood@gmail.com, broonie@kernel.org,  perex@perex.cz,
	tiwai@suse.com
Cc: khalid@kernel.org, shuah@kernel.org,
	david.hunter.linux@gmail.com,  linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: fsl: fsl_ssi: Replace deprecated strcpy() with strscpy()
Date: Fri, 7 Nov 2025 10:04:13 +0530 (IST)	[thread overview]
Message-ID: <fc28b6c4-3495-0581-1dad-41e49ae86917@gmail.com> (raw)
In-Reply-To: <0c7f307c-9de5-4d67-b9da-e728d43e00b6@linuxfoundation.org>



On Thu, 6 Nov 2025, Shuah Khan wrote:

> On 11/4/25 22:21, hariconscious@gmail.com wrote:
> > From: HariKrishna Sagala <hariconscious@gmail.com>
> >
> > strcpy() is deprecated,use strscpy() instead.
> > No functional changes intended.
> > Link: https://github.com/KSPP/linux/issues/88
> >
> > Signed-off-by: HariKrishna Sagala <hariconscious@gmail.com>
> > ---
> > This patch replaces strcpy() call with the strscpy() API.
> > strscpy() is preferred over strcpy()/strncpy() as per the
> > kernel documentation.
>
> Which kernel documentation and can you add why strscpy() ie
> better than strcpy() instead saying "as per the kernel documentation."
> >
> > Thank you.
> >
> >   sound/soc/fsl/fsl_ssi.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
> > index 320108bebf30..b2e1da1781ae 100644
> > --- a/sound/soc/fsl/fsl_ssi.c
> > +++ b/sound/soc/fsl/fsl_ssi.c
> > @@ -1447,7 +1447,7 @@ static int fsl_ssi_probe_from_dt(struct fsl_ssi *ssi)
> >   			dev_err(dev, "failed to get SSI index property\n");
> >   			return -EINVAL;
> >   		}
> > -		strcpy(ssi->card_name, "ac97-codec");
> > +		strscpy(ssi->card_name, "ac97-codec");
> >   	} else if (!of_property_read_bool(np, "fsl,ssi-asynchronous")) {
> >   		/*
> >   		 * In synchronous mode, STCK and STFS ports are used by RX
> >
> > base-commit: 284922f4c563aa3a8558a00f2a05722133237fe8
>
> thanks,
> -- Shuah
>
Please find the below reference links.
https://github.com/KSPP/linux/issues/88
https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy
Thank you.

      reply	other threads:[~2025-11-07  4:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-05  5:21 [PATCH] ASoC: fsl: fsl_ssi: Replace deprecated strcpy() with strscpy() hariconscious
2025-11-06 22:28 ` Shuah Khan
2025-11-07  4:34   ` HariKrishna Sagala [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc28b6c4-3495-0581-1dad-41e49ae86917@gmail.com \
    --to=hariconscious@gmail.com \
    --cc=Xiubo.Lee@gmail.com \
    --cc=broonie@kernel.org \
    --cc=david.hunter.linux@gmail.com \
    --cc=festevam@gmail.com \
    --cc=khalid@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=nicoleotsuka@gmail.com \
    --cc=perex@perex.cz \
    --cc=shengjiu.wang@gmail.com \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox