diff options
author | Krzysztof Kozlowski <[email protected]> | 2022-05-19 09:33:28 +0200 |
---|---|---|
committer | Bjorn Andersson <[email protected]> | 2022-07-16 22:13:32 -0500 |
commit | 766279a8f85df32345dbda03b102ca1ee3d5ddea (patch) | |
tree | c5aa6f40a3300989bce5cc63c40089f6e64c8271 /drivers/usb/cdns3/cdns3-trace.c | |
parent | 99de6509c4135f1d1ceb98c42fa02d249b28b40f (diff) |
rpmsg: qcom: glink: replace strncpy() with strscpy_pad()
The use of strncpy() is considered deprecated for NUL-terminated
strings[1]. Replace strncpy() with strscpy_pad(), to keep existing
pad-behavior of strncpy, similarly to commit 08de420a8014 ("rpmsg:
glink: Replace strncpy() with strscpy_pad()"). This fixes W=1 warning:
In function ‘qcom_glink_rx_close’,
inlined from ‘qcom_glink_work’ at ../drivers/rpmsg/qcom_glink_native.c:1638:4:
drivers/rpmsg/qcom_glink_native.c:1549:17: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
1549 | strncpy(chinfo.name, channel->name, sizeof(chinfo.name));
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/usb/cdns3/cdns3-trace.c')
0 files changed, 0 insertions, 0 deletions