Re: [RFC 1/2] lib/vsprintf: Add support for pte_t

From: Andy Shevchenko
Date: Sat Jun 21 2025 - 15:15:07 EST


Fri, Jun 20, 2025 at 12:23:47PM +0530, Anshuman Khandual kirjoitti:
> On 19/06/25 5:30 PM, Andy Shevchenko wrote:
> > On Thu, Jun 19, 2025 at 03:05:10PM +0530, Anshuman Khandual wrote:
> >> On 18/06/25 11:16 PM, Andy Shevchenko wrote:
> >>> On Wed, Jun 18, 2025 at 09:42:34AM +0530, Anshuman Khandual wrote:

...

> >>>> + spec.field_width = 10;
> >>>> + spec.precision = 8;
> >>>> + spec.base = 16;
> >>>> + spec.flags = SPECIAL | SMALL | ZEROPAD;
> >>>
> >>> Do not duplicate code we have already in the file.
> >> I am sorry - did not get that. Is the above flag combination some
> >> how wrong ?
> >
> > It's dup. Please, take your time to find the very similar piece of code in one
> > of the helper functions we have.
>
> Are you referring to special_hex_number() ?

Bingo!

--
With Best Regards,
Andy Shevchenko