From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: question about drivers/mtd/ubi/cdev.c From: Artem Bityutskiy To: Julia Lawall In-Reply-To: References: <1280891212.4363.5.camel@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" Date: Wed, 04 Aug 2010 09:37:13 +0300 Message-ID: <1280903833.15689.65.camel@localhost> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: linux-mtd@lists.infradead.org, dwmw2@infradead.org Reply-To: dedekind1@gmail.com List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 2010-08-04 at 07:48 +0200, Julia Lawall wrote: > > Hmm, the code is bogus, I do not know how it works, but it does, because > > I tested it :-) > > > > We should not use 're' as a temporary variable inside the loop. I guess > > we can use 're1' instead. I'll change this later, when have time, unless > > you submit a fix earlier :-) > > Would the proper approach be to use list_for_each_entry_safe? Yes, plus not using the iterator as a temporary variable is also a good idea. -- Best Regards, Artem Bityutskiy (Артём Битюцкий)