[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 6 Jun 2013 22:32:55 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Joern Engel <joern@...fs.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Chris Mason <chris.mason@...ionio.com>,
linux-btrfs@...r.kernel.org
Subject: Re: [PATCH 1/2] list: add list_for_each_entry_del
On Mon, Jun 3, 2013 at 8:28 PM, Joern Engel <joern@...fs.org> wrote:
> I have seen a lot of boilerplate code that either follows the pattern of
> while (!list_empty(head)) {
> pos = list_entry(head->next, struct foo, list);
> list_del(pos->list);
> ...
> }
> or some variant thereof.
What the problem to use list_for_each_safe()?
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists