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

2008-01-15 Thread Randy Dunlap
On Tue, 15 Jan 2008 14:46:57 -0600 Matt Mackall wrote: > > On Tue, 2008-01-15 at 11:10 -0800, Randy Dunlap wrote: > > On Tue, 15 Jan 2008 22:02:54 +0300 Anton Salikhmetov wrote: > > > > > 2008/1/15, Christoph Hellwig <[EMAIL PROTECTED]>: > > > > On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton

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

2008-01-15 Thread Matt Mackall
On Tue, 2008-01-15 at 11:10 -0800, Randy Dunlap wrote: > On Tue, 15 Jan 2008 22:02:54 +0300 Anton Salikhmetov wrote: > > > 2008/1/15, Christoph Hellwig <[EMAIL PROTECTED]>: > > > On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov wrote: > > > > > @@ -33,71 +34,65 @@ asmlinkage long

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

2008-01-15 Thread Anton Salikhmetov
2008/1/15, Christoph Hellwig <[EMAIL PROTECTED]>: > On Tue, Jan 15, 2008 at 08:28:48PM +0100, Peter Zijlstra wrote: > > Notice that error is already -EINVAL, so a simple goto should suffice. > > Yes, for the start of the function you can basically leave it as-is. > OK, I will do as you suggest.

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

2008-01-15 Thread Christoph Hellwig
On Tue, Jan 15, 2008 at 08:28:48PM +0100, Peter Zijlstra wrote: > Notice that error is already -EINVAL, so a simple goto should suffice. Yes, for the start of the function you can basically leave it as-is. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

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

2008-01-15 Thread Peter Zijlstra
On Tue, 2008-01-15 at 22:26 +0300, Anton Salikhmetov wrote: > 2008/1/15, Randy Dunlap <[EMAIL PROTECTED]>: > > On Tue, 15 Jan 2008 22:02:54 +0300 Anton Salikhmetov wrote: > > > > > 2008/1/15, Christoph Hellwig <[EMAIL PROTECTED]>: > > > > On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton

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

2008-01-15 Thread Anton Salikhmetov
2008/1/15, Randy Dunlap <[EMAIL PROTECTED]>: > On Tue, 15 Jan 2008 22:02:54 +0300 Anton Salikhmetov wrote: > > > 2008/1/15, Christoph Hellwig <[EMAIL PROTECTED]>: > > > On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov wrote: > > > > > @@ -33,71 +34,65 @@ asmlinkage long

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

2008-01-15 Thread Randy Dunlap
On Tue, 15 Jan 2008 22:02:54 +0300 Anton Salikhmetov wrote: > 2008/1/15, Christoph Hellwig <[EMAIL PROTECTED]>: > > On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov wrote: > > > @@ -33,71 +34,65 @@ asmlinkage long sys_msync(unsigned long start, size_t > > > len, int flags) > > >

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

2008-01-15 Thread Anton Salikhmetov
2008/1/15, Christoph Hellwig <[EMAIL PROTECTED]>: > On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov wrote: > > +++ b/mm/msync.c > > @@ -1,24 +1,25 @@ > > /* > > * linux/mm/msync.c > > * > > + * The msync() system call. > > * Copyright (C) 1994-1999 Linus Torvalds > > + * > >

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

2008-01-15 Thread Christoph Hellwig
On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov wrote: > +++ b/mm/msync.c > @@ -1,24 +1,25 @@ > /* > * linux/mm/msync.c > * > + * The msync() system call. > * Copyright (C) 1994-1999 Linus Torvalds > + * > + * Massive code cleanup. > + * Copyright (C) 2008 Anton Salikhmetov

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

2008-01-15 Thread Christoph Hellwig
On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov wrote: +++ b/mm/msync.c @@ -1,24 +1,25 @@ /* * linux/mm/msync.c * + * The msync() system call. * Copyright (C) 1994-1999 Linus Torvalds + * + * Massive code cleanup. + * Copyright (C) 2008 Anton Salikhmetov [EMAIL

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

2008-01-15 Thread Anton Salikhmetov
2008/1/15, Christoph Hellwig [EMAIL PROTECTED]: On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov wrote: +++ b/mm/msync.c @@ -1,24 +1,25 @@ /* * linux/mm/msync.c * + * The msync() system call. * Copyright (C) 1994-1999 Linus Torvalds + * + * Massive code

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

2008-01-15 Thread Randy Dunlap
On Tue, 15 Jan 2008 22:02:54 +0300 Anton Salikhmetov wrote: 2008/1/15, Christoph Hellwig [EMAIL PROTECTED]: On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov wrote: @@ -33,71 +34,65 @@ asmlinkage long sys_msync(unsigned long start, size_t len, int flags) unsigned

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

2008-01-15 Thread Anton Salikhmetov
2008/1/15, Randy Dunlap [EMAIL PROTECTED]: On Tue, 15 Jan 2008 22:02:54 +0300 Anton Salikhmetov wrote: 2008/1/15, Christoph Hellwig [EMAIL PROTECTED]: On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov wrote: @@ -33,71 +34,65 @@ asmlinkage long sys_msync(unsigned long start,

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

2008-01-15 Thread Peter Zijlstra
On Tue, 2008-01-15 at 22:26 +0300, Anton Salikhmetov wrote: 2008/1/15, Randy Dunlap [EMAIL PROTECTED]: On Tue, 15 Jan 2008 22:02:54 +0300 Anton Salikhmetov wrote: 2008/1/15, Christoph Hellwig [EMAIL PROTECTED]: On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov wrote:

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

2008-01-15 Thread Christoph Hellwig
On Tue, Jan 15, 2008 at 08:28:48PM +0100, Peter Zijlstra wrote: Notice that error is already -EINVAL, so a simple goto should suffice. Yes, for the start of the function you can basically leave it as-is. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a

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

2008-01-15 Thread Anton Salikhmetov
2008/1/15, Christoph Hellwig [EMAIL PROTECTED]: On Tue, Jan 15, 2008 at 08:28:48PM +0100, Peter Zijlstra wrote: Notice that error is already -EINVAL, so a simple goto should suffice. Yes, for the start of the function you can basically leave it as-is. OK, I will do as you suggest. Thank you

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

2008-01-15 Thread Matt Mackall
On Tue, 2008-01-15 at 11:10 -0800, Randy Dunlap wrote: On Tue, 15 Jan 2008 22:02:54 +0300 Anton Salikhmetov wrote: 2008/1/15, Christoph Hellwig [EMAIL PROTECTED]: On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov wrote: @@ -33,71 +34,65 @@ asmlinkage long

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

2008-01-15 Thread Randy Dunlap
On Tue, 15 Jan 2008 14:46:57 -0600 Matt Mackall wrote: On Tue, 2008-01-15 at 11:10 -0800, Randy Dunlap wrote: On Tue, 15 Jan 2008 22:02:54 +0300 Anton Salikhmetov wrote: 2008/1/15, Christoph Hellwig [EMAIL PROTECTED]: On Tue, Jan 15, 2008 at 07:02:44PM +0300, Anton Salikhmetov

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

2008-01-14 Thread Anton Salikhmetov
2008/1/14, Miklos Szeredi <[EMAIL PROTECTED]>: > > Substantial code cleanup of the sys_msync() function: > > > > 1) using the PAGE_ALIGN() macro instead of "manual" alignment; > > 2) improved readability of the loop traversing the process memory regions. > > Thanks for doing this. See comments

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

2008-01-14 Thread Miklos Szeredi
> Substantial code cleanup of the sys_msync() function: > > 1) using the PAGE_ALIGN() macro instead of "manual" alignment; > 2) improved readability of the loop traversing the process memory regions. Thanks for doing this. See comments below. > Signed-off-by: Anton Salikhmetov <[EMAIL

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

2008-01-14 Thread Miklos Szeredi
Substantial code cleanup of the sys_msync() function: 1) using the PAGE_ALIGN() macro instead of manual alignment; 2) improved readability of the loop traversing the process memory regions. Thanks for doing this. See comments below. Signed-off-by: Anton Salikhmetov [EMAIL PROTECTED] ---

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

2008-01-14 Thread Anton Salikhmetov
2008/1/14, Miklos Szeredi [EMAIL PROTECTED]: Substantial code cleanup of the sys_msync() function: 1) using the PAGE_ALIGN() macro instead of manual alignment; 2) improved readability of the loop traversing the process memory regions. Thanks for doing this. See comments below.

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

2008-01-12 Thread Rik van Riel
On Sun, 13 Jan 2008 07:39:58 +0300 Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > Substantial code cleanup of the sys_msync() function: > > 1) using the PAGE_ALIGN() macro instead of "manual" alignment; > 2) improved readability of the loop traversing the process memory regions. > >

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

2008-01-12 Thread Rik van Riel
On Sun, 13 Jan 2008 07:39:58 +0300 Anton Salikhmetov [EMAIL PROTECTED] wrote: Substantial code cleanup of the sys_msync() function: 1) using the PAGE_ALIGN() macro instead of manual alignment; 2) improved readability of the loop traversing the process memory regions. Signed-off-by: Anton