[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220520043657.mq2c4veaxawyhayq@moria.home.lan>
Date: Fri, 20 May 2022 00:36:57 -0400
From: Kent Overstreet <kent.overstreet@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...r.kernel.org,
pmladek@...e.com, rostedt@...dmis.org, senozhatsky@...omium.org,
willy@...radead.org
Subject: Re: [PATCH v2 07/28] lib/printbuf: Unit specifiers
On Fri, May 20, 2022 at 12:16:41AM +0300, Andy Shevchenko wrote:
> On Thu, May 19, 2022 at 04:26:26PM -0400, Kent Overstreet wrote:
> > On Thu, May 19, 2022 at 11:21:41PM +0300, Andy Shevchenko wrote:
> > > On Thu, May 19, 2022 at 01:24:00PM -0400, Kent Overstreet wrote:
>
> ...
>
> > > > + if (v < 0)
> > > > + pr_char(buf, '-');
> > > > + pr_human_readable_u64(buf, abs(v));
> > >
> > > Wouldn't -v work?
> >
> > This is a bit terser
>
> Have you checked assembly? Basically the question here is does the compiler see
> the same conditional and avoid duplicating it?
No. I check the assembly for code where it matters - for this, I'm going to
write it the way I find it most readable.
> I run `make W=1`, but I think the kernel doc validator is run anyway.
Got it, and fixed the doc warnings.
Powered by blists - more mailing lists