diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-20 19:39:03 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-20 19:39:03 +0400 |
commit | 85d5b70d8a0681a362d075bf0d19b4ee8c6767ee (patch) | |
tree | e5f7586fe75821040078766347f6caa635037e69 /drivers/mtd/ubi/upd.c | |
parent | 43260ade2ae649e9ec7655630fd58dce7d8ed6ae (diff) | |
parent | eab737722ed6a5638f6251e83f0d293c2ffe549f (diff) | |
download | linux-85d5b70d8a0681a362d075bf0d19b4ee8c6767ee.tar.xz |
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/upd.c')
-rw-r--r-- | drivers/mtd/ubi/upd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/upd.c b/drivers/mtd/ubi/upd.c index 9f2ebd8750e7..ec2c2dc1c1ca 100644 --- a/drivers/mtd/ubi/upd.c +++ b/drivers/mtd/ubi/upd.c @@ -64,8 +64,7 @@ static int set_update_marker(struct ubi_device *ubi, struct ubi_volume *vol) return 0; } - memcpy(&vtbl_rec, &ubi->vtbl[vol->vol_id], - sizeof(struct ubi_vtbl_record)); + vtbl_rec = ubi->vtbl[vol->vol_id]; vtbl_rec.upd_marker = 1; mutex_lock(&ubi->device_mutex); @@ -93,8 +92,7 @@ static int clear_update_marker(struct ubi_device *ubi, struct ubi_volume *vol, dbg_gen("clear update marker for volume %d", vol->vol_id); - memcpy(&vtbl_rec, &ubi->vtbl[vol->vol_id], - sizeof(struct ubi_vtbl_record)); + vtbl_rec = ubi->vtbl[vol->vol_id]; ubi_assert(vol->upd_marker && vtbl_rec.upd_marker); vtbl_rec.upd_marker = 0; |