]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Bluetooth: btintel_pcie: use strscpy to copy plain strings
authorThorsten Blum <thorsten.blum@linux.dev>
Wed, 1 Apr 2026 16:46:24 +0000 (18:46 +0200)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 13 Apr 2026 13:19:42 +0000 (09:19 -0400)
Use strscpy() instead of snprintf() to copy plain strings with no format
specifiers.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btintel_pcie.c

index 8fb3ebe98146b635a9d97a4972cfb3eacbba09b8..2f59c0d6f9ec4c4c826f284987d03e2b3b8fd814 100644 (file)
@@ -351,7 +351,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);
@@ -661,7 +661,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);