alistair23-linux/drivers/mtd/ubi
Julia Lawall 01ebc12f5f UBI: eliminate update of list_for_each_entry loop cursor
list_for_each_entry uses its first argument to move from one element to the
next, so modifying it can break the iteration.  The variable re1 is already
used within the loop as a temporary variable, and is not live here.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
iterator name list_for_each_entry;
expression x,E;
position p1,p2;
@@

list_for_each_entry@p1(x,...) { <... x =@p2 E ...> }

@@
expression x,E;
position r.p1,r.p2;
statement S;
@@

*x =@p2 E
...
list_for_each_entry@p1(x,...) S
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2010-08-30 10:19:11 +03:00
..
build.c UBI: do not warn unnecessarily 2010-08-02 07:21:19 +03:00
cdev.c UBI: eliminate update of list_for_each_entry loop cursor 2010-08-30 10:19:11 +03:00
debug.c UBI: introduce flash dump helper 2009-08-14 20:02:20 +03:00
debug.h UBI: add write checking 2010-02-01 15:16:37 +02:00
eba.c UBI: do not warn unnecessarily 2010-08-02 07:21:19 +03:00
gluebi.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
io.c UBI: fix error message and compilation warnings 2010-06-14 08:47:49 +03:00
kapi.c UBI: fix s/then/than/ typos 2010-05-07 08:33:10 +03:00
Kconfig UBI: fix s/then/than/ typos 2010-05-07 08:33:10 +03:00
Kconfig.debug
Makefile UBI: make gluebi a separate module 2009-06-03 17:45:23 +03:00
misc.c
scan.c UBI: do not print message about corruptes PEBs if we have none of them 2010-08-02 07:21:19 +03:00
scan.h UBI: introduce eraseblock counter variables 2010-06-04 11:30:43 +03:00
ubi-media.h UBI: add image sequence number to EC header 2009-07-05 18:47:07 +03:00
ubi.h UBI: introduce a new IO return code 2010-06-04 11:30:42 +03:00
upd.c UBI: fix memory leak in update path 2010-01-18 18:53:56 +02:00
vmt.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
vtbl.c UBI: misc comment fixes 2010-05-07 08:33:32 +03:00
wl.c UBI: fix s/then/than/ typos 2010-05-07 08:33:10 +03:00