Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250476
b: refs/heads/master
c: 3802243
h: refs/heads/master
v: v3
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed May 20, 2011
1 parent eac00e0 commit ae9ec35
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1426414431a8d37a6e631e0b5e2ad6186b81876a
refs/heads/master: 3802243a189b0f153acb03f531daf35d40bc38bb
33 changes: 25 additions & 8 deletions trunk/drivers/mtd/ubi/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,31 @@ static inline int ubi_dbg_is_erase_failure(void)

#else

#define ubi_assert(expr) ({})
#define dbg_err(fmt, ...) ({})
#define dbg_msg(fmt, ...) ({})
#define dbg_gen(fmt, ...) ({})
#define dbg_eba(fmt, ...) ({})
#define dbg_wl(fmt, ...) ({})
#define dbg_io(fmt, ...) ({})
#define dbg_bld(fmt, ...) ({})
/* Use "if (0)" to make compiler check arguments even if debugging is off */
#define ubi_assert(expr) do { \
if (0) { \
printk(KERN_CRIT "UBI assert failed in %s at %u (pid %d)\n", \
__func__, __LINE__, current->pid); \
} \
} while (0)

#define dbg_err(fmt, ...) do { \
if (0) \
ubi_err(fmt, ##__VA_ARGS__); \
} while (0)

#define dbg_msg(fmt, ...) do { \
if (0) \
printk(KERN_DEBUG "UBI DBG (pid %d): %s: " fmt "\n", \
current->pid, __func__, ##__VA_ARGS__); \
} while (0)

#define dbg_gen(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_eba(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_wl(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_io(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_bld(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)

#define ubi_dbg_dump_stack() ({})
#define ubi_dbg_dump_ec_hdr(ec_hdr) ({})
#define ubi_dbg_dump_vid_hdr(vid_hdr) ({})
Expand Down

0 comments on commit ae9ec35

Please sign in to comment.