From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] fs/binfmt_elf.c: fix a do-while statement. Date: Tue, 26 Jan 2010 16:06:32 -0800 Message-ID: <20100126160632.3bdbe172.akpm@linux-foundation.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, Alexander Viro , Roland McGrath , WANG Cong , Hugh Dickins , linux-fsdevel@vger.kernel.org To: Thiago Farina Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, 20 Jan 2010 23:03:53 -0500 Thiago Farina wrote: > warning: do-while statement is not a compound statement > > Signed-off-by: Thiago Farina > --- > 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.