From: Thorsten Blum <thorsten.blum@linux.dev>
To: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>,
Christian Gromm <christian.gromm@microchip.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] most: replace snprintf("%s") with strscpy in audio_probe_channel
Date: Thu, 4 Jun 2026 17:29:14 +0200 [thread overview]
Message-ID: <aiGZysdkr4eygyO2@linux.dev> (raw)
In-Reply-To: <20260429000858.1442-3-thorsten.blum@linux.dev>
Gentle ping?
On Wed, Apr 29, 2026 at 02:08:59AM +0200, Thorsten Blum wrote:
> Replace snprintf("%s") with the faster and more direct strscpy().
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> drivers/most/most_snd.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/most/most_snd.c b/drivers/most/most_snd.c
> index 68b9e6c64033..dc366813c31e 100644
> --- a/drivers/most/most_snd.c
> +++ b/drivers/most/most_snd.c
> @@ -16,6 +16,7 @@
> #include <sound/pcm.h>
> #include <sound/pcm_params.h>
> #include <linux/sched.h>
> +#include <linux/string.h>
> #include <linux/kthread.h>
> #include <linux/most.h>
>
> @@ -554,10 +555,8 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id,
> sizeof(*channel), &adpt->card);
> if (ret < 0)
> goto err_free_adpt;
> - snprintf(adpt->card->driver, sizeof(adpt->card->driver),
> - "%s", DRIVER_NAME);
> - snprintf(adpt->card->shortname, sizeof(adpt->card->shortname),
> - "Microchip INIC");
> + strscpy(adpt->card->driver, DRIVER_NAME);
> + strscpy(adpt->card->shortname, "Microchip INIC");
> snprintf(adpt->card->longname, sizeof(adpt->card->longname),
> "%s at %s", adpt->card->shortname, iface->description);
> skip_adpt_alloc:
prev parent reply other threads:[~2026-06-04 15:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 0:08 [PATCH] most: replace snprintf("%s") with strscpy in audio_probe_channel Thorsten Blum
2026-06-04 15:29 ` Thorsten Blum [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=aiGZysdkr4eygyO2@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=christian.gromm@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=parthiban.veerasooran@microchip.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