Skip to content

Commit d2ff0f8

Browse files
Wolfram Sangandersson
authored andcommitted
rpmsg: 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/ Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20220818210100.7277-1-wsa+renesas@sang-engineering.com
1 parent 1135e93 commit d2ff0f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/rpmsg/qcom_glink_ssr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static int qcom_glink_ssr_notifier_call(struct notifier_block *nb,
111111
msg.command = cpu_to_le32(GLINK_SSR_DO_CLEANUP);
112112
msg.seq_num = cpu_to_le32(ssr->seq_num);
113113
msg.name_len = cpu_to_le32(strlen(ssr_name));
114-
strlcpy(msg.name, ssr_name, sizeof(msg.name));
114+
strscpy(msg.name, ssr_name, sizeof(msg.name));
115115

116116
ret = rpmsg_send(ssr->ept, &msg, sizeof(msg));
117117
if (ret < 0)

0 commit comments

Comments
 (0)