]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: BusLogic: Replace deprecated strcpy() + strcat() in blogic_rdconfig()
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 24 Feb 2026 14:48:27 +0000 (15:48 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 24 Feb 2026 18:12:29 +0000 (13:12 -0500)
strcpy() is deprecated [1] and using strcat() is discouraged. Replace
them with scnprintf().  No functional changes.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260224144828.585577-1-thorsten.blum@linux.dev
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/BusLogic.c

index da6599ae3d0d825babcec21940412a8e996dd485..5304d2febd63e55a0070b444eb0225410541a3a5 100644 (file)
@@ -1632,8 +1632,8 @@ common:
        /*
           Initialize the Host Adapter Full Model Name from the Model Name.
         */
-       strcpy(adapter->full_model, "BusLogic ");
-       strcat(adapter->full_model, adapter->model);
+       scnprintf(adapter->full_model, sizeof(adapter->full_model),
+                 "BusLogic %s", adapter->model);
        /*
           Select an appropriate value for the Tagged Queue Depth either from a
           BusLogic Driver Options specification, or based on whether this Host