lkml.org 
[lkml]   [2011]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel: Fix style problems in fork.c
On 03/31/2011 02:48 PM, Aakash Goenka wrote:
> Fixes most style errors and warnings.

Whatever, but there are some real problems with this that I see.


> Signed-off-by: Aakash Goenka<aakash.goenka@gmail.com>
>

Should there really be spaces before that SOB?

> ---
> kernel/fork.c | 96 ++++++++++++++++++++++++++++++++++-----------------------
> 1 files changed, 57 insertions(+), 39 deletions(-)
[...]
>
> - /* One for us, one for whoever does the "release_task()" (usually parent) */
> - atomic_set(&tsk->usage,2);
> + /* One for us, one for whoever does the
> + * "release_task()" (usually parent)
> + */

Except that change doesn't even follow the guidelines.

> + atomic_set(&tsk->usage, 2);
> atomic_set(&tsk->fs_excl, 0);
> #ifdef CONFIG_BLK_DEV_IO_TRACE
> tsk->btrace_seq = 0;
> @@ -355,7 +357,8 @@ static int dup_mmap(struct mm_struct *mm, struct
> mm_struct *oldmm)
> }
> charge = 0;
> if (mpnt->vm_flags& VM_ACCOUNT) {
> - unsigned int len = (mpnt->vm_end - mpnt->vm_start)>> PAGE_SHIFT;
> + unsigned int len =
> + (mpnt->vm_end - mpnt->vm_start)>> PAGE_SHIFT;

You have to ask yourself, Is this one really a change for the better?

[...]
>
> /* ok, now we should be set up.. */
> - p->exit_signal = (clone_flags& CLONE_THREAD) ? -1 : (clone_flags& CSIGNAL);
> + p->exit_signal = (clone_flags& CLONE_THREAD) ?
> + -1 : (clone_flags& CSIGNAL);

Same thing.

.
.
.


\
 
 \ /
  Last update: 2011-04-01 00:11    [W:0.125 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site