]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bus: fsl-mc: Use strscpy() instead of strscpy_pad()
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 29 Apr 2025 10:41:48 +0000 (12:41 +0200)
committerChristophe Leroy <christophe.leroy@csgroup.eu>
Mon, 12 May 2025 23:39:01 +0000 (01:39 +0200)
commit61ddf5faa7cc091b409936d571ec1af34ce487a1
treea1088273fd40902b090374d6c317a2c0320ada39
parent5ddac92be4209f29ec26b3ec59a08fc76afe9ab1
bus: fsl-mc: Use strscpy() instead of strscpy_pad()

Both destination buffers are already zero-initialized, making strscpy()
sufficient for safely copying 'obj_type'. The additional NUL-padding
performed by strscpy_pad() is unnecessary.

If the destination buffer has a fixed length, strscpy() automatically
determines its size using sizeof() when the argument is omitted. This
makes the explicit size arguments unnecessary.

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20250429104149.66334-1-thorsten.blum@linux.dev
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
drivers/bus/fsl-mc/dprc.c