diff options
author | Krzysztof Kozlowski | 2022-05-19 09:33:28 +0200 |
---|---|---|
committer | Bjorn Andersson | 2022-07-16 22:13:32 -0500 |
commit | 766279a8f85df32345dbda03b102ca1ee3d5ddea (patch) | |
tree | c5aa6f40a3300989bce5cc63c40089f6e64c8271 /drivers/virt | |
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 <krzysztof.kozlowski@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220519073330.7187-1-krzysztof.kozlowski@linaro.org
Diffstat (limited to 'drivers/virt')
0 files changed, 0 insertions, 0 deletions