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] [day] [month] [year] [list]
Message-ID: <87wq1xh4f0.fsf@rasmusvillemoes.dk>
Date:	Tue, 31 Mar 2015 12:01:07 +0200
From:	Rasmus Villemoes <linux@...musvillemoes.dk>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	"Kirill A. Shutemov" <kirill@...temov.name>,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Sasha Levin <sasha.levin@...cle.com>,
	Cyrill Gorcunov <gorcunov@...nvz.org>,
	Roman Gushchin <klamm@...dex-team.ru>,
	Hugh Dickins <hughd@...gle.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/mmap.c: use while instead of if+goto

On Mon, Mar 30 2015, Andrew Morton <akpm@...ux-foundation.org> wrote:

> On Mon, 30 Mar 2015 23:54:13 +0300 "Kirill A. Shutemov" <kirill@...temov.name> wrote:
>
>> On Mon, Mar 30, 2015 at 09:40:35PM +0200, Rasmus Villemoes wrote:
>> > The creators of the C language gave us the while keyword. Let's use
>> > that instead of synthesizing it from if+goto.
>> > 
>> > Made possible by 6597d783397a ("mm/mmap.c: replace find_vma_prepare()
>> > with clearer find_vma_links()").
>> > 
>> > Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
>> 
>> 
>> Looks good, except both your plus-lines are over 80-characters long for no
>> reason.
>
> --- a/mm/mmap.c~mm-mmapc-use-while-instead-of-ifgoto-fix
> +++ a/mm/mmap.c
> @@ -1551,7 +1551,8 @@ unsigned long mmap_region(struct file *f
>
> I'm not sure it improves things a lot, but mmap.c has been pretty
> careful about the 80-col thing...

Yeah, I did run checkpatch and chose to ignore the 80-col warning, since
I think both the patch and the resulting code was more readable that
way. I don't really care either way, though.

Rasmus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ