]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Bluetooth: btintel_pcie: Replace snprintf("%s") with strscpy
authorThorsten Blum <thorsten.blum@linux.dev>
Fri, 20 Feb 2026 08:00:59 +0000 (09:00 +0100)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 10 Apr 2026 14:23:21 +0000 (10:23 -0400)
Replace snprintf("%s", ...) with the faster and more direct strscpy().

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 37b744e35bc459939abb7a3d601967195377913c..eda243988cfdfc21fb78b3934258c8a9c5c82294 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/module.h>
 #include <linux/firmware.h>
 #include <linux/pci.h>
+#include <linux/string.h>
 #include <linux/wait.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
@@ -268,7 +269,7 @@ static inline void btintel_pcie_dump_debug_registers(struct hci_dev *hdev)
        if (!skb)
                return;
 
-       snprintf(buf, sizeof(buf), "%s", "---- Dump of debug registers ---");
+       strscpy(buf, "---- Dump of debug registers ---");
        bt_dev_dbg(hdev, "%s", buf);
        skb_put_data(skb, buf, strlen(buf));