lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 20 May 2022 00:16:41 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Kent Overstreet <kent.overstreet@...il.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 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?

...

> > > + * pr_human_readable_u64 - Print out a u64 according to printbuf unit options
> > 
> > Have you ever compile this? We have kernel doc validator running when compiling
> > the code...
> 
> Yes I have, but I've never seen the kernel doc validator - can you point me to
> something so I can get that working?

I run `make W=1`, but I think the kernel doc validator is run anyway.

You always can run it manually

	scripts/kernel-doc -v -none lib/printbuf.c

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists