Re: [PATCH v2] media: verisilicon: Replace strlcat() with scnprintf()

From: Thorsten Blum

Date: Wed Nov 11 2026 - 17:17:36 EST


On Tue, Nov 10, 2026 at 07:24:46PM -0800, Mariia Nikitash wrote:
> In preparation for removing the deprecated strlcat() API [1], replace the
> strscpy() and strlcat() calls in hantro_add_func() with a single
> scnprintf() call.
>
> This preserves the resulting string, including NUL termination
> and truncation behavior.
>
> Link: https://github.com/KSPP/linux/issues/370 [1]
> Signed-off-by: Mariia Nikitash <nikitash.mariiaw@xxxxxxxxx>
> ---
> Changes in v2:
> - Replace seq_buf with a single scnprintf() call, as suggested
> by Hans Verkuil.
>
> drivers/media/platform/verisilicon/hantro_drv.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)

Nit: the prefix "media: hantro:" would probably be a better fit.

Otherwise, this looks good to me.

Reviewed-by: Thorsten Blum <blum@xxxxxxxxxx>