Re: [PATCH] crypto: octeontx - use strscpy_pad in ucode_load_store

From: Herbert Xu

Date: Fri May 29 2026 - 02:06:56 EST


On Wed, May 20, 2026 at 12:00:30PM +0200, Thorsten Blum wrote:
> Instead of zero-initializing the temporary buffer and then copying into
> it with strscpy(), use strscpy_pad() to copy the string and zero-pad any
> trailing bytes. Drop the explicit size argument to further simplify the
> code since strscpy_pad() can determine it automatically when the
> destination buffer has a fixed length.
>
> Also use strscpy_pad() to check for string truncation instead of the
> hard-coded OTX_CPT_UCODE_NAME_LENGTH.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
> ---
> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt