Skip to content

Commit 3153249

Browse files
Artem BityutskiyArtem Bityutskiy
authored andcommitted
UBI: introduce debugging helper function
Introduce a helper function to print hexdump: 'ubi_dbg_print_hex_dump()'. It is compiled out if debugging is enabled. Will be used in the next patch. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
1 parent bb00e18 commit 3153249

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎drivers/mtd/ubi/debug.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ void ubi_dbg_dump_seb(const struct ubi_scan_leb *seb, int type);
5757
void ubi_dbg_dump_mkvol_req(const struct ubi_mkvol_req *req);
5858
void ubi_dbg_dump_flash(struct ubi_device *ubi, int pnum, int offset, int len);
5959

60+
#define ubi_dbg_print_hex_dump(l, ps, pt, r, g, b, len, a) \
61+
print_hex_dump(l, ps, pt, r, g, b, len, a)
62+
6063
#ifdef CONFIG_MTD_UBI_DEBUG_MSG
6164
/* General debugging messages */
6265
#define dbg_gen(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
@@ -172,6 +175,7 @@ static inline int ubi_dbg_is_erase_failure(void)
172175
#define ubi_dbg_dump_seb(seb, type) ({})
173176
#define ubi_dbg_dump_mkvol_req(req) ({})
174177
#define ubi_dbg_dump_flash(ubi, pnum, offset, len) ({})
178+
#define ubi_dbg_print_hex_dump(l, ps, pt, r, g, b, len, a) ({})
175179

176180
#define UBI_IO_DEBUG 0
177181
#define DBG_DISABLE_BGT 0

0 commit comments

Comments
 (0)