Re: [PATCH v2 3/3] drivers: add deprecated remarks to strlcat()

From: Geert Uytterhoeven

Date: Fri May 15 2026 - 03:31:57 EST


Hi Manuel,

On Thu, 14 May 2026 at 18:32, Manuel Ebner <manuelebner@xxxxxxxxxxx> wrote:
> add kernel-doc comment to strlcat() function definitions
>
> Signed-off-by: Manuel Ebner <manuelebner@xxxxxxxxxxx>

Thanks for your patch!

> --- a/lib/string.c
> +++ b/lib/string.c
> @@ -249,6 +249,17 @@ EXPORT_SYMBOL(strncat);
> #endif
>
> #ifndef __HAVE_ARCH_STRLCAT
> +/**
> + * strlcat - Append a string to an existing string
> + *
> + * @dest: pointer to %NUL-terminated string to append to
> + * @src: pointer to %NUL-terminated string to append from
> + * @count: Maximum bytes available in @dest
> + *

Missing "Returns ...".

> + * Do not use this function. Prefer building the string with
> + * formatting, via scnprintf(), seq_buf, or similar.
> + *
> + */
> size_t strlcat(char *dest, const char *src, size_t count)
> {
> size_t dsize = strlen(dest);

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds