Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751272Ab3FDUHh (ORCPT ); Tue, 4 Jun 2013 16:07:37 -0400 Received: from mo-p05-ob.rzone.de ([81.169.146.181]:15435 "EHLO mo-p05-ob.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750808Ab3FDUHf (ORCPT ); Tue, 4 Jun 2013 16:07:35 -0400 X-RZG-AUTH: :IGUXYVOIf/Z0yAghYbpIhzghmj8icP68r1arC3zTx2B9G7/X5zri/u5Y2+bsZKRiOQ== X-RZG-CLASS-ID: mo05 Message-ID: <51AE4969.8050709@gmx.net> Date: Tue, 04 Jun 2013 22:09:13 +0200 From: Arne Jansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 MIME-Version: 1.0 To: Chris Mason CC: Christoph Hellwig , J??rn Engel , "linux-kernel@vger.kernel.org" , "linux-btrfs@vger.kernel.org" Subject: Re: [PATCH 0/2] introduce list_for_each_entry_del References: <1370280485-10047-1-git-send-email-joern@logfs.org> <20130603204930.GA28299@infradead.org> <20130603193647.GB10200@logfs.org> <20130603195555.GC10200@logfs.org> <20130604144856.GA12302@infradead.org> <20130604145322.4088.78915@localhost.localdomain> In-Reply-To: <20130604145322.4088.78915@localhost.localdomain> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1220 Lines: 34 On 06/04/13 16:53, Chris Mason wrote: > Quoting Christoph Hellwig (2013-06-04 10:48:56) >> On Mon, Jun 03, 2013 at 03:55:55PM -0400, J??rn Engel wrote: >>> Actually, when I compare the two invocations, I prefer the >>> list_for_each_entry_del() variant over list_pop_entry(). >>> >>> while ((ref = list_pop_entry(&prefs, struct __prelim_ref, list))) { >>> list_for_each_entry_del(ref, &prefs, list) { >>> >>> Christoph? >> >> I really don't like something that looks like an iterator (*for_each*) >> to modify a list. Maybe it's just me, so I'd love to hear others chime >> in. > > Have to agree with Christoph. I just couldn't put my finger on why I > didn't like it until I saw the list_pop_entry suggestion. list_pop_each_entry? > > -chris > > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- 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/