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]
Message-ID: <aCXG3XwU4cmlmcM3@gmail.com>
Date: Thu, 15 May 2025 12:50:05 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: linux-kernel@...r.kernel.org, Andy Shevchenko <andy@...nel.org>,
	Arnd Bergmann <arnd@...nel.org>, Borislav Petkov <bp@...en8.de>,
	Juergen Gross <jgross@...e.com>, "H . Peter Anvin" <hpa@...or.com>,
	Kees Cook <keescook@...omium.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Mike Rapoport <rppt@...nel.org>,
	Paul Menzel <pmenzel@...gen.mpg.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	David Woodhouse <dwmw@...zon.co.uk>
Subject: Re: [PATCH 07/29] x86/boot/e820: Print out sizes of E820 memory
 ranges


* Ingo Molnar <mingo@...nel.org> wrote:

> > > +	}
> > > +	if (size < SZ_1G) {
> > 
> > Can be written in one line as
> > 
> > 	} else if (...) {
> 
> Done. (See delta patch below.)

Actually, I take this back, as there's a return in the branch above:

                        pr_cont(" %4llu   MB", size/SZ_1M);
                return;
        }
        if (size < SZ_1T) {

Which makes the plain 'if' more readable: the previous 'if' branches 
off entirely and control flow never gets back, so mix the blocks with 
'else if' looks a bit weird.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ