Thread (5 messages) 5 messages, 3 authors, 2025-05-17

Re: [RESEND PATCH] bus: fsl-mc: Use strscpy() instead of strscpy_pad()

From: Ioana Ciornei <ioana.ciornei@nxp.com>
Date: 2025-04-29 11:47:32
Also in: lkml

On Tue, Apr 29, 2025 at 12:41:48PM +0200, Thorsten Blum wrote:
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>

Christophe, could you also pick-up this patch when you have a chance?

Thank you,
Ioana
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help