Re: [PATCH 1/2] Massive code cleanup of sys_msync()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Anton Salikhmetov <salikhmetov@...>
Cc: <linux-mm@...>, <jakob@...>, <linux-kernel@...>, <valdis.kletnieks@...>, <riel@...>, <ksm@...>, <staubach@...>, <jesper.juhl@...>, <torvalds@...>, <a.p.zijlstra@...>, <akpm@...>, <protasnb@...>, <miklos@...>
Date: Tuesday, January 15, 2008 - 1:57 pm

On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov wrote:

Please don't put the changelog in here, that's what the log in the SCM
is for.  And while you're at it remove the confusing file name comment.
This should now look something like:

/*
 * The msync() system call.
 *
 * Copyright (C) 1994-1999  Linus Torvalds
 * Copyright (C) 2008 Anton Salikhmetov <salikhmetov@gmail.com>
 */


The goto out for a simple return style is used quite commonly in kernel
code to have a single return statement which makes code maintaince, e.g.
adding locks or allocations simpler.  Not sure that getting rid of it
makes a lot of sense.


Given that file is assigned just above it would be more readable to test
it first.


This should be an goto out, returns out of the middle of the function
make reading and maintaining the code not so nice.


Care to get rid of this odd GNU extension while you're at it and use
the proper

	return error ? error : unmapped_error;

?

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/2] Updating ctime and mtime for memory-mapped files..., Anton Salikhmetov, (Tue Jan 15, 12:02 pm)
Re: [PATCH 0/2] Updating ctime and mtime for memory-mapped f..., Anton Salikhmetov, (Tue Jan 15, 6:15 pm)
[PATCH 1/2] Massive code cleanup of sys_msync(), Anton Salikhmetov, (Tue Jan 15, 12:02 pm)
Re: [PATCH 1/2] Massive code cleanup of sys_msync(), Christoph Hellwig, (Tue Jan 15, 1:57 pm)
Re: [PATCH 1/2] Massive code cleanup of sys_msync(), Anton Salikhmetov, (Tue Jan 15, 3:02 pm)
Re: [PATCH 1/2] Massive code cleanup of sys_msync(), Randy Dunlap, (Tue Jan 15, 3:10 pm)
Re: [PATCH 1/2] Massive code cleanup of sys_msync(), Matt Mackall, (Tue Jan 15, 4:46 pm)
Re: [PATCH 1/2] Massive code cleanup of sys_msync(), Randy Dunlap, (Tue Jan 15, 5:06 pm)
Re: [PATCH 1/2] Massive code cleanup of sys_msync(), Anton Salikhmetov, (Tue Jan 15, 3:26 pm)
Re: [PATCH 1/2] Massive code cleanup of sys_msync(), Peter Zijlstra, (Tue Jan 15, 3:28 pm)
Re: [PATCH 1/2] Massive code cleanup of sys_msync(), Christoph Hellwig, (Tue Jan 15, 3:32 pm)
Re: [PATCH 1/2] Massive code cleanup of sys_msync(), Anton Salikhmetov, (Tue Jan 15, 4:12 pm)
[PATCH 2/2] Updating ctime and mtime at syncing, Anton Salikhmetov, (Tue Jan 15, 12:02 pm)
Re: [PATCH 2/2] Updating ctime and mtime at syncing, Christoph Hellwig, (Tue Jan 15, 2:04 pm)
Re: [PATCH 2/2] Updating ctime and mtime at syncing, Anton Salikhmetov, (Tue Jan 15, 3:04 pm)
Re: [PATCH 2/2] Updating ctime and mtime at syncing, Peter Zijlstra, (Tue Jan 15, 12:35 pm)
Re: [PATCH 2/2] Updating ctime and mtime at syncing, Anton Salikhmetov, (Tue Jan 15, 1:18 pm)
Re: [PATCH 2/2] Updating ctime and mtime at syncing, Peter Zijlstra, (Tue Jan 15, 3:30 pm)