linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thiago Farina <tfransosi@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
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 23:44:29 -0200	[thread overview]
Message-ID: <a4c8a6d01001261744n37e3472em8e772d9ecf368adf@mail.gmail.com> (raw)
In-Reply-To: <20100126160632.3bdbe172.akpm@linux-foundation.org>

Hi Andrew,

On Tue, Jan 26, 2010 at 10:06 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> 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?
>
Yes, it is a sparse warning.

> 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.

Yeah, much noise for a small thing. I will not fix more warnings like
this in future.

-Thiago

  reply	other threads:[~2010-01-27  1:44 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
2010-01-27  1:44   ` Thiago Farina [this message]
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=a4c8a6d01001261744n37e3472em8e772d9ecf368adf@mail.gmail.com \
    --to=tfransosi@gmail.com \
    --cc=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=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).