summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sunzilog.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2022-08-18 23:01:12 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-30 14:21:59 +0200
commiteb9e109d010cb79ab01d8562e851d53bcecf059b (patch)
tree479bf03a9f1ff1150b429eb0864a2eb05a7114dd /drivers/tty/serial/sunzilog.c
parentdt-bindings: serial: samsung: Add 'power-domains' property (diff)
downloadlinux-eb9e109d010cb79ab01d8562e851d53bcecf059b.tar.xz
linux-eb9e109d010cb79ab01d8562e851d53bcecf059b.zip
tty: move from strlcpy with unused retval to strscpy
Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20220818210113.7469-1-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sunzilog.c')
-rw-r--r--drivers/tty/serial/sunzilog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/sunzilog.c b/drivers/tty/serial/sunzilog.c
index c14275d83b0b..c44cf613ff1a 100644
--- a/drivers/tty/serial/sunzilog.c
+++ b/drivers/tty/serial/sunzilog.c
@@ -1307,13 +1307,13 @@ static void sunzilog_register_serio(struct uart_sunzilog_port *up)
serio->id.type = SERIO_RS232;
if (up->flags & SUNZILOG_FLAG_CONS_KEYB) {
serio->id.proto = SERIO_SUNKBD;
- strlcpy(serio->name, "zskbd", sizeof(serio->name));
+ strscpy(serio->name, "zskbd", sizeof(serio->name));
} else {
serio->id.proto = SERIO_SUN;
serio->id.extra = 1;
- strlcpy(serio->name, "zsms", sizeof(serio->name));
+ strscpy(serio->name, "zsms", sizeof(serio->name));
}
- strlcpy(serio->phys,
+ strscpy(serio->phys,
((up->flags & SUNZILOG_FLAG_CONS_KEYB) ?
"zs/serio0" : "zs/serio1"),
sizeof(serio->phys));