Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754485Ab0A0AH2 (ORCPT ); Tue, 26 Jan 2010 19:07:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753992Ab0A0AHY (ORCPT ); Tue, 26 Jan 2010 19:07:24 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:48776 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754041Ab0A0AHV (ORCPT ); Tue, 26 Jan 2010 19:07:21 -0500 Date: Tue, 26 Jan 2010 16:06:32 -0800 From: Andrew Morton To: Thiago Farina Cc: linux-kernel@vger.kernel.org, Alexander Viro , Roland McGrath , WANG Cong , Hugh Dickins , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] fs/binfmt_elf.c: fix a do-while statement. Message-Id: <20100126160632.3bdbe172.akpm@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.9; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1318 Lines: 40 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/