Skip to content

Commit c7ae5d7

Browse files
tobluxandreas-gaisler
authored andcommitted
sparc: floppy: Replace deprecated strcpy() with strscpy() in sun_floppy_init()
strcpy() is deprecated; use strscpy() instead. No functional changes intended. Link: KSPP#88 Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Andreas Larsson <andreas@gaisler.com>
1 parent 8ebfe29 commit c7ae5d7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

arch/sparc/include/asm/floppy_64.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/of.h>
1414
#include <linux/of_platform.h>
1515
#include <linux/dma-mapping.h>
16+
#include <linux/string.h>
1617

1718
#include <asm/auxio.h>
1819

@@ -618,7 +619,7 @@ static unsigned long __init sun_floppy_init(void)
618619
sun_pci_fd_ebus_dma.callback = sun_pci_fd_dma_callback;
619620
sun_pci_fd_ebus_dma.client_cookie = NULL;
620621
sun_pci_fd_ebus_dma.irq = FLOPPY_IRQ;
621-
strcpy(sun_pci_fd_ebus_dma.name, "floppy");
622+
strscpy(sun_pci_fd_ebus_dma.name, "floppy");
622623
if (ebus_dma_register(&sun_pci_fd_ebus_dma))
623624
return 0;
624625

0 commit comments

Comments
 (0)