[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZsyCDP-AJqH02zJk@smile.fi.intel.com>
Date: Mon, 26 Aug 2024 16:24:28 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Petr Mladek <pmladek@...e.com>
Cc: Ira Weiny <ira.weiny@...el.com>, Dave Jiang <dave.jiang@...el.com>,
Fan Ni <fan.ni@...sung.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Navneet Singh <navneet.singh@...el.com>, Chris Mason <clm@...com>,
Josef Bacik <josef@...icpanda.com>, David Sterba <dsterba@...e.com>,
Steven Rostedt <rostedt@...dmis.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Jonathan Corbet <corbet@....net>,
Andrew Morton <akpm@...ux-foundation.org>,
Dan Williams <dan.j.williams@...el.com>,
Davidlohr Bueso <dave@...olabs.net>,
Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
linux-btrfs@...r.kernel.org, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
nvdimm@...ts.linux.dev
Subject: Re: [PATCH v3 02/25] printk: Add print format (%par) for struct range
On Mon, Aug 26, 2024 at 03:17:26PM +0200, Petr Mladek wrote:
> On Thu 2024-08-22 12:53:32, Ira Weiny wrote:
> > Petr Mladek wrote:
> > > On Fri 2024-08-16 09:44:10, Ira Weiny wrote:
[...]
> > > > + static const struct printf_spec range_spec = {
> > > > + .base = 16,
> > > > + .field_width = RANGE_PRINTK_SIZE,
> >
> > However, my testing indicates this needs to be.
> >
> > .field_width = 18, /* 2 (0x) + 2 * 8 (bytes) */
>
> Makes sense. Great catch!
Which effectively means usage of special_hex_number().
But again, consider to unite this with %pR/r implementation(s).
> > ... to properly zero pad the value. Does that make sense?
> >
> > > > + .precision = -1,
> > > > + .flags = SPECIAL | SMALL | ZEROPAD,
> > > > + };
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists