aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/wl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-20 10:39:03 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-20 10:39:03 -0500
commit85d5b70d8a0681a362d075bf0d19b4ee8c6767ee (patch)
treee5f7586fe75821040078766347f6caa635037e69 /drivers/mtd/ubi/wl.c
parent43260ade2ae649e9ec7655630fd58dce7d8ed6ae (diff)
parenteab737722ed6a5638f6251e83f0d293c2ffe549f (diff)
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/wl.c')
-rw-r--r--drivers/mtd/ubi/wl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index 2144f611196e..5df49d3cb5c7 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -1,5 +1,4 @@
1/* 1/*
2 * @ubi: UBI device description object
3 * Copyright (c) International Business Machines Corp., 2006 2 * Copyright (c) International Business Machines Corp., 2006
4 * 3 *
5 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
@@ -2050,7 +2049,7 @@ static int self_check_ec(struct ubi_device *ubi, int pnum, int ec)
2050 long long read_ec; 2049 long long read_ec;
2051 struct ubi_ec_hdr *ec_hdr; 2050 struct ubi_ec_hdr *ec_hdr;
2052 2051
2053 if (!ubi->dbg->chk_gen) 2052 if (!ubi_dbg_chk_gen(ubi))
2054 return 0; 2053 return 0;
2055 2054
2056 ec_hdr = kzalloc(ubi->ec_hdr_alsize, GFP_NOFS); 2055 ec_hdr = kzalloc(ubi->ec_hdr_alsize, GFP_NOFS);
@@ -2090,7 +2089,7 @@ out_free:
2090static int self_check_in_wl_tree(const struct ubi_device *ubi, 2089static int self_check_in_wl_tree(const struct ubi_device *ubi,
2091 struct ubi_wl_entry *e, struct rb_root *root) 2090 struct ubi_wl_entry *e, struct rb_root *root)
2092{ 2091{
2093 if (!ubi->dbg->chk_gen) 2092 if (!ubi_dbg_chk_gen(ubi))
2094 return 0; 2093 return 0;
2095 2094
2096 if (in_wl_tree(e, root)) 2095 if (in_wl_tree(e, root))
@@ -2116,7 +2115,7 @@ static int self_check_in_pq(const struct ubi_device *ubi,
2116 struct ubi_wl_entry *p; 2115 struct ubi_wl_entry *p;
2117 int i; 2116 int i;
2118 2117
2119 if (!ubi->dbg->chk_gen) 2118 if (!ubi_dbg_chk_gen(ubi))
2120 return 0; 2119 return 0;
2121 2120
2122 for (i = 0; i < UBI_PROT_QUEUE_LEN; ++i) 2121 for (i = 0; i < UBI_PROT_QUEUE_LEN; ++i)