mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: LiuJunyuan <2058432396@qq.com>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	LiuJunyuan <2058432396@qq.com>
Subject: [PATCH] staging: vme_user: use scnprintf in tsi148_alloc_resource
Date: Wed, 21 Oct 2026 11:13:49 +0800	[thread overview]
Message-ID: <tencent_F5EEA06B3CD49F9EFF5C185259BF4134DA0A@qq.com> (raw)

Replace sprintf() with scnprintf() when formatting the resource name.

Signed-off-by: LiuJunyuan <2058432396@qq.com>
---
 drivers/staging/vme_user/vme_tsi148.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vme_user/vme_tsi148.c b/drivers/staging/vme_user/vme_tsi148.c
index 9447c00bc013..a0a7c8341995 100644
--- a/drivers/staging/vme_user/vme_tsi148.c
+++ b/drivers/staging/vme_user/vme_tsi148.c
@@ -745,8 +745,8 @@ static int tsi148_alloc_resource(struct vme_master_resource *image,
 		}
 	}
 
-	sprintf((char *)image->bus_resource.name, "%s.%d", tsi148_bridge->name,
-		image->number);
+	scnprintf(image->bus_resource.name, VMENAMSIZ + 3, "%s.%d",
+		  tsi148_bridge->name, image->number);
 
 	image->bus_resource.start = 0;
 	image->bus_resource.end = (unsigned long)size;
-- 
2.43.0



             reply	other threads:[~2026-10-21  3:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21  3:13 LiuJunyuan [this message]
2026-10-21  6:01 ` Dan Carpenter
2026-10-21  6:15 ` Greg KH
2026-10-21  9:01 ` David Laight

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=tencent_F5EEA06B3CD49F9EFF5C185259BF4134DA0A@qq.com \
    --to=2058432396@qq.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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®