From: Thorsten Blum <thorsten.blum@linux.dev>
To: Marcel Holtmann <marcel@holtmann.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Thorsten Blum <thorsten.blum@linux.dev>,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Bluetooth: btintel_pcie: use strscpy to copy plain strings
Date: Wed, 1 Apr 2026 18:46:24 +0200 [thread overview]
Message-ID: <20260401164622.752376-3-thorsten.blum@linux.dev> (raw)
Use strscpy() instead of snprintf() to copy plain strings with no format
specifiers.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
drivers/bluetooth/btintel_pcie.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 37b744e35bc4..b4de93b6ef3b 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -340,7 +341,7 @@ static inline void btintel_pcie_dump_debug_registers(struct hci_dev *hdev)
snprintf(buf, sizeof(buf), "txq: cr_tia: %u cr_hia: %u", cr_tia, cr_hia);
skb_put_data(skb, buf, strlen(buf));
bt_dev_dbg(hdev, "%s", buf);
- snprintf(buf, sizeof(buf), "--------------------------------");
+ strscpy(buf, "--------------------------------");
bt_dev_dbg(hdev, "%s", buf);
hci_recv_diag(hdev, skb);
@@ -650,7 +651,7 @@ static int btintel_pcie_read_dram_buffers(struct btintel_pcie_data *data)
else
return -EINVAL;
- snprintf(vendor, sizeof(vendor), "Vendor: Intel\n");
+ strscpy(vendor, "Vendor: Intel\n");
snprintf(driver, sizeof(driver), "Driver: %s\n",
data->dmp_hdr.driver_name);
next reply other threads:[~2026-04-01 16:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 16:46 Thorsten Blum [this message]
2026-04-09 20:00 ` [PATCH] Bluetooth: btintel_pcie: use strscpy to copy plain strings patchwork-bot+bluetooth
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=20260401164622.752376-3-thorsten.blum@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.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