Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754696Ab3GOTGb (ORCPT ); Mon, 15 Jul 2013 15:06:31 -0400 Received: from longford.logfs.org ([213.229.74.203]:59807 "EHLO longford.logfs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752467Ab3GOTGa (ORCPT ); Mon, 15 Jul 2013 15:06:30 -0400 Date: Mon, 15 Jul 2013 13:35:08 -0400 From: =?utf-8?B?SsO2cm4=?= Engel To: Filipe David Manana Cc: linux-kernel@vger.kernel.org, Chris Mason , "linux-btrfs@vger.kernel.org" Subject: Re: [PATCH 1/2] list: add list_del_each_entry Message-ID: <20130715173508.GB20517@logfs.org> References: <1370280485-10047-1-git-send-email-joern@logfs.org> <20130705204100.GA15943@logfs.org> <20130705204129.GB15943@logfs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 852 Lines: 26 On Fri, 5 July 2013 23:38:01 +0100, Filipe David Manana wrote: > > > +#define list_del_each_entry(pos, head, member) \ > > + while (list_empty(head) && (pos = list_first_entry((head), \ > > + typeof(*pos), member), list_del((head)->next), 1)) > > + > > Shouldn't it be while (!list_empty(head) ... ? > (not operator addition) Obviously! Now where is that brown paperbag... Will resend in a few days, including the _init variants dchinner asked for. Jörn -- Computer system analysis is like child-rearing; you can do grievous damage, but you cannot ensure success." -- Tom DeMarco -- 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/