Re: [PATCH v2 2/2] lib/string.c: Add wcslen()

From: Andy Shevchenko
Date: Wed Mar 26 2025 - 14:42:35 EST


On Wed, Mar 26, 2025 at 8:39 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
> On Wed, Mar 26, 2025 at 7:19 PM Nathan Chancellor <nathan@xxxxxxxxxx> wrote:

...

> > --- a/include/linux/string.h
> > +++ b/include/linux/string.h
> > @@ -7,6 +7,7 @@
> > #include <linux/cleanup.h> /* for DEFINE_FREE() */
> > #include <linux/compiler.h> /* for inline */
> > #include <linux/types.h> /* for size_t */
>
> > +#include <linux/nls_types.h> /* for wchar_t */
>
> I know it's not ordered, but can we at least not make it worse, i.e.
> squeeze this to be after the compiler.h? Or even somewhere after below
> the err*.h? Whatever gives a better (sparsely) ordered overall
> result...

I just checked, and the only unordered piece is those two: types +
stddef right now, and if you move nls_types.h after errno.h it will
keep the status quo.

> > #include <linux/stddef.h> /* for NULL */
> > #include <linux/err.h> /* for ERR_PTR() */

--
With Best Regards,
Andy Shevchenko