linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Thiago Farina <tfransosi@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Roland McGrath <roland@redhat.com>, WANG Cong <amwang@redhat.com>,
	Hugh Dickins <hugh.dickins@tiscali.co.uk>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fs/binfmt_elf.c: fix a do-while statement.
Date: Tue, 26 Jan 2010 16:06:32 -0800	[thread overview]
Message-ID: <20100126160632.3bdbe172.akpm@linux-foundation.org> (raw)
In-Reply-To: <c370b092a68e66a2ac6c9d852967d843a1b574c0.1264046338.git.tfransosi@gmail.com>

On Wed, 20 Jan 2010 23:03:53 -0500
Thiago Farina <tfransosi@gmail.com> wrote:

> warning: do-while statement is not a compound statement
> 
> Signed-off-by: Thiago Farina <tfransosi@gmail.com>
> ---
>  fs/binfmt_elf.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
> index edd90c4..75d6468 100644
> --- a/fs/binfmt_elf.c
> +++ b/fs/binfmt_elf.c
> @@ -1404,9 +1404,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm)
>  {
>  	elf_addr_t *auxv = (elf_addr_t *) mm->saved_auxv;
>  	int i = 0;
> -	do
> +	do {
>  		i += 2;
> -	while (auxv[i - 2] != AT_NULL);
> +	} while (auxv[i - 2] != AT_NULL);
>  	fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv);
>  }

hmpf.  Which tool emitted that warning?  sparse?

It is somewhat unconventional coding style and it'd be good if
checkpatch were to warn so that we don't _add_ such things to the tree.

But IMO it's such a minor thing that once it _is_ in the tree, it's not
really worth the patch noise to go and fix it up.

  parent reply	other threads:[~2010-01-27  0:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-21  4:03 [PATCH] fs/binfmt_elf.c: fix a do-while statement Thiago Farina
2010-01-21  6:22 ` Cong Wang
2010-01-27  0:06 ` Andrew Morton [this message]
2010-01-27  1:44   ` Thiago Farina
2010-01-27  2:07     ` Andrew Morton

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=20100126160632.3bdbe172.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=amwang@redhat.com \
    --cc=hugh.dickins@tiscali.co.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@redhat.com \
    --cc=tfransosi@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).