Re: [PATCH v16 04/14] lib: kstrtox: add initial value to _parse_integer_limit()
From: Jonathan Cameron
Date: Thu Jun 25 2026 - 06:58:57 EST
On Thu, 25 Jun 2026 08:30:07 +0100
Rodrigo Alencar <455.rodrigo.alencar@xxxxxxxxx> wrote:
> On 24/06/26 15:54, Jonathan Cameron wrote:
> > On Sun, 14 Jun 2026 21:00:44 +0100
> > Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> >
> > > On Thu, 4 Jun 2026 11:09:33 +0100
> > > Rodrigo Alencar <455.rodrigo.alencar@xxxxxxxxx> wrote:
> > >
> > > > On 26/06/04 10:58AM, Rodrigo Alencar via B4 Relay wrote:
> > > > > From: Rodrigo Alencar <rodrigo.alencar@xxxxxxxxxx>
> > > > >
> > > > > Add init parameter to _parse_integer_limit() that defines an initial
> > > > > value for the accumulated result when parsing an 64-bit integer. The
> > > > > new function prototype is adjusted so that the _parse_integer() macros
> > > > > stay consistent allowing for one more argument, which defaults to 0.
> > > >
> > > > ...
> > > >
> > > > > noinline
> > > > > unsigned int _parse_integer_limit(const char *s, unsigned int base, unsigned long long *p,
> > > > > - size_t max_chars)
> > > > > + size_t max_chars, unsigned long long init)
> > > > > {
> > > > > unsigned long long res;
> > > > > unsigned int rv;
> > > > >
> > > > > - res = 0;
> > > > > + res = init;
> > > >
> > > > This might generate conflict, as the code around have changed in linux-next.
> > > > It is an easy fix though.
> > > >
> > > Thanks for the heads up. Hopefully that will all fall out when I rebase testing
> > > on rc1 once that is out.
> > I've done a mid merge cycle rebase as the char-misc branches have merged.
> > So this should be resolve on my testing branch now.
>
> https://lore.kernel.org/oe-kbuild-all/202606250230.etPGuolf-lkp@xxxxxxxxx/
>
> Apparently, the documentation header now includes parameter descriptions.
> The new one is missing.
I'm snowed under for next few days so if you have time to spin me a fixup patch
that I can just apply that would be great.
If not I'll get to it next week probably.
Jonathan
>