mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: Aakash Goenka <aakash.goenka@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Oleg Nesterov <oleg@redhat.com>,
	Roland McGrath <roland@redhat.com>, Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] kernel: Fix style problems in fork.c
Date: Thu, 31 Mar 2011 15:08:42 -0700	[thread overview]
Message-ID: <4D94FB6A.3050606@caviumnetworks.com> (raw)
In-Reply-To: <AANLkTi=jHAJ8H0penc8Tkz6w2ihaP3CrkZoQAB9L1G2T@mail.gmail.com>

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.

.
.
.

  reply	other threads:[~2011-03-31 22:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-31 21:48 Aakash Goenka
2011-03-31 22:08 ` David Daney [this message]
2011-04-01  3:47   ` Aakash Goenka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D94FB6A.3050606@caviumnetworks.com \
    --to=ddaney@caviumnetworks.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=aakash.goenka@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oleg@redhat.com \
    --cc=roland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome