Re: [PATCH] mm/mmap.c: use while instead of if+goto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 30 2015, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Mon, 30 Mar 2015 23:54:13 +0300 "Kirill A. Shutemov" <kirill@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxx>
>> 
>> 
>> 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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]