From: Shuah Khan <skhan@linuxfoundation.org>
To: Ai Chao <aichao@kylinos.cn>,
gregkh@linuxfoundation.org, b-liu@ti.com, johan@kernel.org,
badhri@google.com, heikki.krogerus@linux.intel.com,
valentina.manea.m@gmail.com, shuah@kernel.org, i@zenithal.me,
tiwai@suse.de, kees@kernel.org, christophe.jaillet@wanadoo.fr,
prashanth.k@oss.qualcomm.com, khtsai@google.com,
dan.carpenter@linaro.org, tglx@kernel.org, mingo@kernel.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH 6/6] usbip: vhci_sysfs: Use safer strscpy() instead of strcpy()
Date: Tue, 10 Mar 2026 16:10:20 -0600 [thread overview]
Message-ID: <b49bc467-8c51-41fc-a7ee-5770a9720deb@linuxfoundation.org> (raw)
In-Reply-To: <20260310094434.3639602-7-aichao@kylinos.cn>
On 3/10/26 03:44, Ai Chao wrote:
> Use a safer function strscpy() instead of strcpy() for copying to
> arrays.
>
> Only idiomatic code replacement, and no functional changes.
It is a functional change since it calls a new routine. Get rid
of this line from change log.
How did you test this patch? I am curious because of you are
describing the change as "idiomatic code replacement"
>
> Signed-off-by: Ai Chao <aichao@kylinos.cn>
> ---
> drivers/usb/usbip/vhci_sysfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/usbip/vhci_sysfs.c b/drivers/usb/usbip/vhci_sysfs.c
> index bfc10f665e52..5bc8c47788d4 100644
> --- a/drivers/usb/usbip/vhci_sysfs.c
> +++ b/drivers/usb/usbip/vhci_sysfs.c
> @@ -463,7 +463,7 @@ static void set_status_attr(int id)
>
> status = status_attrs + id;
> if (id == 0)
> - strcpy(status->name, "status");
> + strscpy(status->name, "status");
> else
> snprintf(status->name, MAX_STATUS_NAME+1, "status.%d", id);
> status->attr.attr.name = status->name;
thanks,
-- Shuah
next prev parent reply other threads:[~2026-03-10 22:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 9:44 [PATCH 0/6] " Ai Chao
2026-03-10 9:44 ` [PATCH 1/6] USB: serial: ti_usb_3410_5052: " Ai Chao
2026-03-17 14:37 ` Johan Hovold
2026-03-10 9:44 ` [PATCH 2/6] usb: musb: " Ai Chao
2026-03-10 9:44 ` [PATCH 3/6] usb: gadget: functionfs: " Ai Chao
2026-03-10 9:44 ` [PATCH 4/6] usb: typec: tcpm: " Ai Chao
2026-03-10 9:44 ` [PATCH 5/6] usb: gadget: udc: " Ai Chao
2026-03-10 9:44 ` [PATCH 6/6] usbip: vhci_sysfs: " Ai Chao
2026-03-10 22:10 ` Shuah Khan [this message]
2026-03-11 7:22 ` Dan Carpenter
2026-03-24 21:34 ` Shuah Khan
2026-03-25 11:09 ` Dan Carpenter
[not found] <7990xi1aonqb-79968wxve9t0@nsmail8.2--kylin--1>
2026-03-26 18:19 ` Shuah Khan
2026-03-30 14:49 ` gregkh
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=b49bc467-8c51-41fc-a7ee-5770a9720deb@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=aichao@kylinos.cn \
--cc=b-liu@ti.com \
--cc=badhri@google.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=i@zenithal.me \
--cc=johan@kernel.org \
--cc=kees@kernel.org \
--cc=khtsai@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=prashanth.k@oss.qualcomm.com \
--cc=shuah@kernel.org \
--cc=tglx@kernel.org \
--cc=tiwai@suse.de \
--cc=valentina.manea.m@gmail.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
all inboxes | Powered by JetHome®