diff options
author | Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> | 2012-04-23 23:59:49 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-20 13:25:58 -0400 |
commit | 25886a368d58edd9bb0f63d4417d2f73592b9dba (patch) | |
tree | 1d520825e52db0ca220738ca0704f5318b3814c7 /drivers/mtd/ubi/debug.h | |
parent | 56b04e3e8b5cbf71c23a739f34f9a9437afa41fb (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/debug.h')
-rw-r--r-- | drivers/mtd/ubi/debug.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h index ead2cd16ba75..aff6499cde47 100644 --- a/drivers/mtd/ubi/debug.h +++ b/drivers/mtd/ubi/debug.h | |||
@@ -28,14 +28,12 @@ | |||
28 | if (unlikely(!(expr))) { \ | 28 | if (unlikely(!(expr))) { \ |
29 | printk(KERN_CRIT "UBI assert failed in %s at %u (pid %d)\n", \ | 29 | printk(KERN_CRIT "UBI assert failed in %s at %u (pid %d)\n", \ |
30 | __func__, __LINE__, current->pid); \ | 30 | __func__, __LINE__, current->pid); \ |
31 | ubi_dbg_dump_stack(); \ | 31 | dump_stack(); \ |
32 | } \ | 32 | } \ |
33 | } while (0) | 33 | } while (0) |
34 | 34 | ||
35 | #define dbg_err(fmt, ...) ubi_err(fmt, ##__VA_ARGS__) | 35 | #define dbg_err(fmt, ...) ubi_err(fmt, ##__VA_ARGS__) |
36 | 36 | ||
37 | #define ubi_dbg_dump_stack() dump_stack() | ||
38 | |||
39 | #define ubi_dbg_print_hex_dump(l, ps, pt, r, g, b, len, a) \ | 37 | #define ubi_dbg_print_hex_dump(l, ps, pt, r, g, b, len, a) \ |
40 | print_hex_dump(l, ps, pt, r, g, b, len, a) | 38 | print_hex_dump(l, ps, pt, r, g, b, len, a) |
41 | 39 | ||
@@ -194,7 +192,6 @@ static inline int ubi_dbg_is_erase_failure(const struct ubi_device *ubi) | |||
194 | #define dbg_io(fmt, ...) ubi_dbg_msg(fmt, ##__VA_ARGS__) | 192 | #define dbg_io(fmt, ...) ubi_dbg_msg(fmt, ##__VA_ARGS__) |
195 | #define dbg_bld(fmt, ...) ubi_dbg_msg(fmt, ##__VA_ARGS__) | 193 | #define dbg_bld(fmt, ...) ubi_dbg_msg(fmt, ##__VA_ARGS__) |
196 | 194 | ||
197 | static inline void ubi_dbg_dump_stack(void) { return; } | ||
198 | static inline void | 195 | static inline void |
199 | ubi_dbg_dump_ec_hdr(const struct ubi_ec_hdr *ec_hdr) { return; } | 196 | ubi_dbg_dump_ec_hdr(const struct ubi_ec_hdr *ec_hdr) { return; } |
200 | static inline void | 197 | static inline void |