Re: [PATCH] kernel: Fix style problems in fork.c

From: David Daney
Date: Thu Mar 31 2011 - 18:08:57 EST


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@xxxxxxxxx>


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.

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