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

Thorsten Blum blum at kernel.org
Wed Nov 11 14:04:24 PST 2026


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 at gmail.com>
> ---
> 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 at kernel.org>



More information about the Linux-rockchip mailing list