From: Ruslan Bilovol <ruslan.bilovol@gmail.com>
To: Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jonathan Corbet <corbet@lwn.net>
Cc: gschmottlach@gmail.com, linux-usb@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/8] usb: gadget: u_audio: convert to strscpy
Date: Mon, 1 Mar 2021 15:05:36 +0200 [thread overview]
Message-ID: <1614603943-11668-2-git-send-email-ruslan.bilovol@gmail.com> (raw)
In-Reply-To: <1614603943-11668-1-git-send-email-ruslan.bilovol@gmail.com>
Usage of strlcpy in Linux Kernel has been recently
deprecated [1], convert driver to strscpy
[1] https://lore.kernel.org/lkml/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
---
drivers/usb/gadget/function/u_audio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/gadget/function/u_audio.c b/drivers/usb/gadget/function/u_audio.c
index 265c4d8..5fbceee 100644
--- a/drivers/usb/gadget/function/u_audio.c
+++ b/drivers/usb/gadget/function/u_audio.c
@@ -549,15 +549,15 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name,
if (err < 0)
goto snd_fail;
- strlcpy(pcm->name, pcm_name, sizeof(pcm->name));
+ strscpy(pcm->name, pcm_name, sizeof(pcm->name));
pcm->private_data = uac;
uac->pcm = pcm;
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &uac_pcm_ops);
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &uac_pcm_ops);
- strlcpy(card->driver, card_name, sizeof(card->driver));
- strlcpy(card->shortname, card_name, sizeof(card->shortname));
+ strscpy(card->driver, card_name, sizeof(card->driver));
+ strscpy(card->shortname, card_name, sizeof(card->shortname));
sprintf(card->longname, "%s %i", card_name, card->dev->id);
snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS,
--
1.9.1
next prev parent reply other threads:[~2021-03-01 13:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 13:05 [PATCH 0/8] USB Audio Gadget part 2: Feedback endpoint, Volume/Mute support Ruslan Bilovol
2021-03-01 13:05 ` Ruslan Bilovol [this message]
2021-03-01 13:05 ` [PATCH 2/8] usb: gadget: f_uac2/u_audio: add feedback endpoint support Ruslan Bilovol
2021-04-17 9:43 ` Pavel Hofman
2021-03-01 13:05 ` [PATCH 3/8] usb: gadget: f_uac2: add adaptive sync support for capture Ruslan Bilovol
2021-03-01 13:05 ` [PATCH 4/8] usb: gadget: u_audio: add real feedback implementation Ruslan Bilovol
2021-03-01 13:05 ` [PATCH 5/8] usb: audio-v2: add ability to define feature unit descriptor Ruslan Bilovol
2021-03-01 13:05 ` [PATCH 6/8] usb: gadget: u_audio: add bi-directional volume and mute support Ruslan Bilovol
2021-03-01 13:05 ` [PATCH 7/8] usb: gadget: f_uac2: add " Ruslan Bilovol
2021-03-01 13:05 ` [PATCH 8/8] usb: gadget: f_uac1: " Ruslan Bilovol
2021-03-23 11:56 ` [PATCH 0/8] USB Audio Gadget part 2: Feedback endpoint, Volume/Mute support Greg Kroah-Hartman
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=1614603943-11668-2-git-send-email-ruslan.bilovol@gmail.com \
--to=ruslan.bilovol@gmail.com \
--cc=balbi@kernel.org \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=gschmottlach@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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
all inboxes | Powered by JetHome®