aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/debug.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-12-18 05:57:52 -0500
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-12-26 12:15:16 -0500
commitd19bafd99d334cdc2530a7466235756bbc87c5d5 (patch)
treee30b3568c55c31659f92f7f30153ed32f91a16d8 /drivers/mtd/ubi/debug.h
parent40e4d0c1660f8ee01ea4ed570297b32c35c70aa3 (diff)
UBI: add PID to debugging prints
Also, use single dbg_msg() macro for all prints. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/debug.h')
-rw-r--r--drivers/mtd/ubi/debug.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h
index 467722eb618b..51c40b17f1ec 100644
--- a/drivers/mtd/ubi/debug.h
+++ b/drivers/mtd/ubi/debug.h
@@ -39,8 +39,9 @@
39 39
40#ifdef CONFIG_MTD_UBI_DEBUG_MSG 40#ifdef CONFIG_MTD_UBI_DEBUG_MSG
41/* Generic debugging message */ 41/* Generic debugging message */
42#define dbg_msg(fmt, ...) \ 42#define dbg_msg(fmt, ...) \
43 printk(KERN_DEBUG "UBI DBG: %s: " fmt "\n", __FUNCTION__, ##__VA_ARGS__) 43 printk(KERN_DEBUG "UBI DBG (pid %d): %s: " fmt "\n", \
44 current->pid, __FUNCTION__, ##__VA_ARGS__)
44 45
45#define ubi_dbg_dump_stack() dump_stack() 46#define ubi_dbg_dump_stack() dump_stack()
46 47
@@ -76,36 +77,28 @@ void ubi_dbg_dump_mkvol_req(const struct ubi_mkvol_req *req);
76 77
77#ifdef CONFIG_MTD_UBI_DEBUG_MSG_EBA 78#ifdef CONFIG_MTD_UBI_DEBUG_MSG_EBA
78/* Messages from the eraseblock association unit */ 79/* Messages from the eraseblock association unit */
79#define dbg_eba(fmt, ...) \ 80#define dbg_eba(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
80 printk(KERN_DEBUG "UBI DBG eba: %s: " fmt "\n", __FUNCTION__, \
81 ##__VA_ARGS__)
82#else 81#else
83#define dbg_eba(fmt, ...) ({}) 82#define dbg_eba(fmt, ...) ({})
84#endif 83#endif
85 84
86#ifdef CONFIG_MTD_UBI_DEBUG_MSG_WL 85#ifdef CONFIG_MTD_UBI_DEBUG_MSG_WL
87/* Messages from the wear-leveling unit */ 86/* Messages from the wear-leveling unit */
88#define dbg_wl(fmt, ...) \ 87#define dbg_wl(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
89 printk(KERN_DEBUG "UBI DBG wl: %s: " fmt "\n", __FUNCTION__, \
90 ##__VA_ARGS__)
91#else 88#else
92#define dbg_wl(fmt, ...) ({}) 89#define dbg_wl(fmt, ...) ({})
93#endif 90#endif
94 91
95#ifdef CONFIG_MTD_UBI_DEBUG_MSG_IO 92#ifdef CONFIG_MTD_UBI_DEBUG_MSG_IO
96/* Messages from the input/output unit */ 93/* Messages from the input/output unit */
97#define dbg_io(fmt, ...) \ 94#define dbg_io(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
98 printk(KERN_DEBUG "UBI DBG io: %s: " fmt "\n", __FUNCTION__, \
99 ##__VA_ARGS__)
100#else 95#else
101#define dbg_io(fmt, ...) ({}) 96#define dbg_io(fmt, ...) ({})
102#endif 97#endif
103 98
104#ifdef CONFIG_MTD_UBI_DEBUG_MSG_BLD 99#ifdef CONFIG_MTD_UBI_DEBUG_MSG_BLD
105/* Initialization and build messages */ 100/* Initialization and build messages */
106#define dbg_bld(fmt, ...) \ 101#define dbg_bld(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
107 printk(KERN_DEBUG "UBI DBG bld: %s: " fmt "\n", __FUNCTION__, \
108 ##__VA_ARGS__)
109#else 102#else
110#define dbg_bld(fmt, ...) ({}) 103#define dbg_bld(fmt, ...) ({})
111#endif 104#endif