|
39 | 39 |
|
40 | 40 | #ifdef CONFIG_MTD_UBI_DEBUG_MSG |
41 | 41 | /* Generic debugging message */ |
42 | | -#define dbg_msg(fmt, ...) \ |
43 | | - printk(KERN_DEBUG "UBI DBG: %s: " fmt "\n", __FUNCTION__, ##__VA_ARGS__) |
| 42 | +#define dbg_msg(fmt, ...) \ |
| 43 | + printk(KERN_DEBUG "UBI DBG (pid %d): %s: " fmt "\n", \ |
| 44 | + current->pid, __FUNCTION__, ##__VA_ARGS__) |
44 | 45 |
|
45 | 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 | 78 | #ifdef CONFIG_MTD_UBI_DEBUG_MSG_EBA |
78 | 79 | /* Messages from the eraseblock association unit */ |
79 | | -#define dbg_eba(fmt, ...) \ |
80 | | - printk(KERN_DEBUG "UBI DBG eba: %s: " fmt "\n", __FUNCTION__, \ |
81 | | - ##__VA_ARGS__) |
| 80 | +#define dbg_eba(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__) |
82 | 81 | #else |
83 | 82 | #define dbg_eba(fmt, ...) ({}) |
84 | 83 | #endif |
85 | 84 |
|
86 | 85 | #ifdef CONFIG_MTD_UBI_DEBUG_MSG_WL |
87 | 86 | /* Messages from the wear-leveling unit */ |
88 | | -#define dbg_wl(fmt, ...) \ |
89 | | - printk(KERN_DEBUG "UBI DBG wl: %s: " fmt "\n", __FUNCTION__, \ |
90 | | - ##__VA_ARGS__) |
| 87 | +#define dbg_wl(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__) |
91 | 88 | #else |
92 | 89 | #define dbg_wl(fmt, ...) ({}) |
93 | 90 | #endif |
94 | 91 |
|
95 | 92 | #ifdef CONFIG_MTD_UBI_DEBUG_MSG_IO |
96 | 93 | /* Messages from the input/output unit */ |
97 | | -#define dbg_io(fmt, ...) \ |
98 | | - printk(KERN_DEBUG "UBI DBG io: %s: " fmt "\n", __FUNCTION__, \ |
99 | | - ##__VA_ARGS__) |
| 94 | +#define dbg_io(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__) |
100 | 95 | #else |
101 | 96 | #define dbg_io(fmt, ...) ({}) |
102 | 97 | #endif |
103 | 98 |
|
104 | 99 | #ifdef CONFIG_MTD_UBI_DEBUG_MSG_BLD |
105 | 100 | /* Initialization and build messages */ |
106 | | -#define dbg_bld(fmt, ...) \ |
107 | | - printk(KERN_DEBUG "UBI DBG bld: %s: " fmt "\n", __FUNCTION__, \ |
108 | | - ##__VA_ARGS__) |
| 101 | +#define dbg_bld(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__) |
109 | 102 | #else |
110 | 103 | #define dbg_bld(fmt, ...) ({}) |
111 | 104 | #endif |
|
0 commit comments