]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rpmsg: Use strscpy() instead of strscpy_pad()
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 29 Apr 2025 10:45:43 +0000 (12:45 +0200)
committerBjorn Andersson <andersson@kernel.org>
Sun, 21 Sep 2025 02:29:48 +0000 (21:29 -0500)
commitc8a8df494f7103f66d2d677347b7b941d8de71a1
treebc3f75c846c7e5daa49282caf68188bd0c6a9c4a
parent214ae22e6d4f774f053a8f7d32bd6a9874447b06
rpmsg: Use strscpy() instead of strscpy_pad()

kzalloc() already zero-initializes the destination buffer, making
strscpy() sufficient for safely copying the name. The additional NUL-
padding performed by strscpy_pad() is unnecessary.

The size parameter is optional, and strscpy() automatically determines
the size of the destination buffer using sizeof() when the argument is
omitted. RPMSG_NAME_SIZE is equal to sizeof(rpdev->id.name) and can be
removed - remove it.

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://lore.kernel.org/r/20250429104543.66927-2-thorsten.blum@linux.dev
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/rpmsg/qcom_glink_native.c
drivers/rpmsg/qcom_smd.c