Re: [PATCH v1 1/1] string: Export strnchrnul()
From: Yury Norov
Date: Tue Nov 10 2026 - 13:08:26 EST
On Tue, Nov 10, 2026 at 05:41:50PM +0100, Andy Shevchenko wrote:
> Export strnchrnul() for users that may be compiled as modules.
>
> Reported-by: Armin Wolf <W_Armin@xxxxxx>
> Closes: https://lore.kernel.org/r/1969fb5a-38ef-4b4b-9d2f-cb9a4348b968@xxxxxx
> Fixes: 0bee0cece2a6 ("lib/string: add strnchrnul()")
Not sure that exporting a symbol is actually a fix. It rather looks
like a normal development. Also, I'd like to have this patch attached
to the PDx86 or whatever series that uses it.
Their implementation may change, so this would become the exported
symbols space bloat.
Thanks,
Yury
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
>
> Assumed to go via PDx86 where the first (wow!) module user wants to use it.
>
> lib/string.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/string.c b/lib/string.c
> index a3778d5aab4a..cc8982a93afc 100644
> --- a/lib/string.c
> +++ b/lib/string.c
> @@ -352,6 +352,7 @@ char *strnchrnul(const char *s, size_t count, int c)
> s++;
> return (char *)s;
> }
> +EXPORT_SYMBOL(strnchrnul);
>
> #ifndef __HAVE_ARCH_STRRCHR
> /**
> --
> 2.50.1
>