From: Thorsten Blum Date: Sat, 31 Jan 2026 22:44:11 +0000 (+0100) Subject: sparc: vio: Replace snprintf with strscpy in vio_create_one X-Git-Tag: ceph-for-7.0-rc4~316^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=674fb053e95d63b4810142c3a2fa357353014d29;p=ceph-client.git sparc: vio: Replace snprintf with strscpy in vio_create_one Replace snprintf("%s", ...) with the faster and more direct strscpy(). Signed-off-by: Thorsten Blum Reviewed-by: Andreas Larsson Signed-off-by: Andreas Larsson --- diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c index 1a1a9d6b8f2e..8c7dd72ef334 100644 --- a/arch/sparc/kernel/vio.c +++ b/arch/sparc/kernel/vio.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -378,8 +379,7 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp, * the parent doesn't require the MD node info. */ if (node_name != NULL) { - (void) snprintf(vdev->node_name, VIO_MAX_NAME_LEN, "%s", - node_name); + strscpy(vdev->node_name, node_name); err = mdesc_get_node_info(hp, mp, node_name, &vdev->md_node_info);