summaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/debug.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-04-25 10:02:44 +0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-05-20 21:25:58 +0400
commita904e3f1deb21b986b7789a830fa8f132ff3d406 (patch)
tree6850b21416600cab1c28a9b531035e70a1132aca /drivers/mtd/ubi/debug.h
parentef7088e7f84ba550b276bc4a74f2732ee5618fb8 (diff)
downloadlinux-a904e3f1deb21b986b7789a830fa8f132ff3d406.tar.xz
UBI: always dump VID and EC headers in case of errors
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. Always dump the VID and EC headers' contents in case of errors when it is helpful. 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.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h
index 4bce78dc5226..b8672c947bb5 100644
--- a/drivers/mtd/ubi/debug.h
+++ b/drivers/mtd/ubi/debug.h
@@ -22,6 +22,8 @@
#define __UBI_DEBUG_H__
void ubi_dump_flash(struct ubi_device *ubi, int pnum, int offset, int len);
+void ubi_dump_ec_hdr(const struct ubi_ec_hdr *ec_hdr);
+void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr);
#ifdef CONFIG_MTD_UBI_DEBUG
#include <linux/random.h>
@@ -58,8 +60,6 @@ void ubi_dump_flash(struct ubi_device *ubi, int pnum, int offset, int len);
/* Initialization and build messages */
#define dbg_bld(fmt, ...) ubi_dbg_msg("bld", fmt, ##__VA_ARGS__)
-void ubi_dbg_dump_ec_hdr(const struct ubi_ec_hdr *ec_hdr);
-void ubi_dbg_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr);
void ubi_dbg_dump_vol_info(const struct ubi_volume *vol);
void ubi_dbg_dump_vtbl_record(const struct ubi_vtbl_record *r, int idx);
void ubi_dbg_dump_sv(const struct ubi_scan_volume *sv);
@@ -194,10 +194,6 @@ static inline int ubi_dbg_is_erase_failure(const struct ubi_device *ubi)
#define dbg_bld(fmt, ...) ubi_dbg_msg(fmt, ##__VA_ARGS__)
static inline void
-ubi_dbg_dump_ec_hdr(const struct ubi_ec_hdr *ec_hdr) { return; }
-static inline void
-ubi_dbg_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr) { return; }
-static inline void
ubi_dbg_dump_vol_info(const struct ubi_volume *vol) { return; }
static inline void
ubi_dbg_dump_vtbl_record(const struct ubi_vtbl_record *r, int idx) { return; }