summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/fastmap.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-20 07:39:03 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-20 07:39:03 -0800
commit85d5b70d8a0681a362d075bf0d19b4ee8c6767ee (patch)
treee5f7586fe75821040078766347f6caa635037e69 /drivers/mtd/ubi/fastmap.c
parent43260ade2ae649e9ec7655630fd58dce7d8ed6ae (diff)
parenteab737722ed6a5638f6251e83f0d293c2ffe549f (diff)
downloadtalos-op-linux-85d5b70d8a0681a362d075bf0d19b4ee8c6767ee.tar.gz
talos-op-linux-85d5b70d8a0681a362d075bf0d19b4ee8c6767ee.zip
Merge tag 'upstream-3.8-rc1' of git://git.infradead.org/linux-ubi
Pull UBI update from Artem Bityutskiy: "Nothing exciting, just clean-ups and nicification. Oh, and one small optimization which makes UBI to use less RAM." * tag 'upstream-3.8-rc1' of git://git.infradead.org/linux-ubi: UBI: embed ubi_debug_info field in ubi_device struct UBI: introduce helpers dbg_chk_{io, gen} UBI: replace memcpy with struct assignment UBI: remove spurious comment UBI: gluebi: rename misleading variables UBI: do not allocate the memory unnecessarily UBI: use list_move_tail instead of list_del/list_add_tail
Diffstat (limited to 'drivers/mtd/ubi/fastmap.c')
-rw-r--r--drivers/mtd/ubi/fastmap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index 1a5f53c090d4..0648c6996d43 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -814,10 +814,8 @@ static int ubi_attach_fastmap(struct ubi_device *ubi,
if (max_sqnum > ai->max_sqnum)
ai->max_sqnum = max_sqnum;
- list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &free, u.list) {
- list_del(&tmp_aeb->u.list);
- list_add_tail(&tmp_aeb->u.list, &ai->free);
- }
+ list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &free, u.list)
+ list_move_tail(&tmp_aeb->u.list, &ai->free);
/*
* If fastmap is leaking PEBs (must not happen), raise a
OpenPOWER on IntegriCloud