aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/wl.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@linux.intel.com>2012-04-23 23:59:49 -0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-05-20 13:25:58 -0400
commit25886a368d58edd9bb0f63d4417d2f73592b9dba (patch)
tree1d520825e52db0ca220738ca0704f5318b3814c7 /drivers/mtd/ubi/wl.c
parent56b04e3e8b5cbf71c23a739f34f9a9437afa41fb (diff)
UBI: always dump the stack on error
UBI (and UBIFS) are a bit over-engineered WRT debugging. The idea was to link as few as possible when debugging is disabled, but the downside is that most people produce bug reports which are difficult to understand. This patch weeds out the 'ubi_dbg_dump_stack()' function and turns it into 'dump_stack()' - it is always useful to have stack dump in case of an error. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/ubi/wl.c')
-rw-r--r--drivers/mtd/ubi/wl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index 7c1a9bf8ac86..b0a6d53ef047 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -1603,7 +1603,7 @@ static int paranoid_check_ec(struct ubi_device *ubi, int pnum, int ec)
1603 if (ec != read_ec) { 1603 if (ec != read_ec) {
1604 ubi_err("paranoid check failed for PEB %d", pnum); 1604 ubi_err("paranoid check failed for PEB %d", pnum);
1605 ubi_err("read EC is %lld, should be %d", read_ec, ec); 1605 ubi_err("read EC is %lld, should be %d", read_ec, ec);
1606 ubi_dbg_dump_stack(); 1606 dump_stack();
1607 err = 1; 1607 err = 1;
1608 } else 1608 } else
1609 err = 0; 1609 err = 0;
@@ -1634,7 +1634,7 @@ static int paranoid_check_in_wl_tree(const struct ubi_device *ubi,
1634 1634
1635 ubi_err("paranoid check failed for PEB %d, EC %d, RB-tree %p ", 1635 ubi_err("paranoid check failed for PEB %d, EC %d, RB-tree %p ",
1636 e->pnum, e->ec, root); 1636 e->pnum, e->ec, root);
1637 ubi_dbg_dump_stack(); 1637 dump_stack();
1638 return -EINVAL; 1638 return -EINVAL;
1639} 1639}
1640 1640
@@ -1662,7 +1662,7 @@ static int paranoid_check_in_pq(const struct ubi_device *ubi,
1662 1662
1663 ubi_err("paranoid check failed for PEB %d, EC %d, Protect queue", 1663 ubi_err("paranoid check failed for PEB %d, EC %d, Protect queue",
1664 e->pnum, e->ec); 1664 e->pnum, e->ec);
1665 ubi_dbg_dump_stack(); 1665 dump_stack();
1666 return -EINVAL; 1666 return -EINVAL;
1667} 1667}
1668 1668