|
21 | 21 | #ifndef __UBI_DEBUG_H__ |
22 | 22 | #define __UBI_DEBUG_H__ |
23 | 23 |
|
| 24 | +struct ubi_ec_hdr; |
| 25 | +struct ubi_vid_hdr; |
| 26 | +struct ubi_volume; |
| 27 | +struct ubi_vtbl_record; |
| 28 | +struct ubi_scan_volume; |
| 29 | +struct ubi_scan_leb; |
| 30 | +struct ubi_mkvol_req; |
| 31 | + |
24 | 32 | #ifdef CONFIG_MTD_UBI_DEBUG |
25 | 33 | #include <linux/random.h> |
26 | 34 |
|
|
45 | 53 |
|
46 | 54 | #define ubi_dbg_dump_stack() dump_stack() |
47 | 55 |
|
48 | | -struct ubi_ec_hdr; |
49 | | -struct ubi_vid_hdr; |
50 | | -struct ubi_volume; |
51 | | -struct ubi_vtbl_record; |
52 | | -struct ubi_scan_volume; |
53 | | -struct ubi_scan_leb; |
54 | | -struct ubi_mkvol_req; |
55 | | - |
56 | 56 | void ubi_dbg_dump_ec_hdr(const struct ubi_ec_hdr *ec_hdr); |
57 | 57 | void ubi_dbg_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr); |
58 | 58 | void ubi_dbg_dump_vol_info(const struct ubi_volume *vol); |
@@ -209,23 +209,36 @@ static inline int ubi_dbg_is_erase_failure(void) |
209 | 209 | #define dbg_io(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__) |
210 | 210 | #define dbg_bld(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__) |
211 | 211 |
|
212 | | -#define ubi_dbg_dump_stack() ({}) |
213 | | -#define ubi_dbg_dump_ec_hdr(ec_hdr) ({}) |
214 | | -#define ubi_dbg_dump_vid_hdr(vid_hdr) ({}) |
215 | | -#define ubi_dbg_dump_vol_info(vol) ({}) |
216 | | -#define ubi_dbg_dump_vtbl_record(r, idx) ({}) |
217 | | -#define ubi_dbg_dump_sv(sv) ({}) |
218 | | -#define ubi_dbg_dump_seb(seb, type) ({}) |
219 | | -#define ubi_dbg_dump_mkvol_req(req) ({}) |
220 | | -#define ubi_dbg_dump_flash(ubi, pnum, offset, len) ({}) |
221 | | -#define ubi_dbg_print_hex_dump(l, ps, pt, r, g, b, len, a) ({}) |
222 | | - |
223 | | -#define ubi_dbg_is_bgt_disabled() 0 |
224 | | -#define ubi_dbg_is_bitflip() 0 |
225 | | -#define ubi_dbg_is_write_failure() 0 |
226 | | -#define ubi_dbg_is_erase_failure() 0 |
227 | | -#define ubi_dbg_check_all_ff(ubi, pnum, offset, len) 0 |
228 | | -#define ubi_dbg_check_write(ubi, buf, pnum, offset, len) 0 |
| 212 | +static inline void ubi_dbg_dump_stack(void) { return; } |
| 213 | +static inline void |
| 214 | +ubi_dbg_dump_ec_hdr(const struct ubi_ec_hdr *ec_hdr) { return; } |
| 215 | +static inline void |
| 216 | +ubi_dbg_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr) { return; } |
| 217 | +static inline void |
| 218 | +ubi_dbg_dump_vol_info(const struct ubi_volume *vol) { return; } |
| 219 | +static inline void |
| 220 | +ubi_dbg_dump_vtbl_record(const struct ubi_vtbl_record *r, int idx) { return; } |
| 221 | +static inline void ubi_dbg_dump_sv(const struct ubi_scan_volume *sv) { return; } |
| 222 | +static inline void ubi_dbg_dump_seb(const struct ubi_scan_leb *seb, |
| 223 | + int type) { return; } |
| 224 | +static inline void |
| 225 | +ubi_dbg_dump_mkvol_req(const struct ubi_mkvol_req *req) { return; } |
| 226 | +static inline void ubi_dbg_dump_flash(struct ubi_device *ubi, |
| 227 | + int pnum, int offset, int len) { return; } |
| 228 | +static inline void |
| 229 | +ubi_dbg_print_hex_dump(const char *l, const char *ps, int pt, int r, |
| 230 | + int g, const void *b, size_t len, bool a) { return; } |
| 231 | + |
| 232 | +static inline int ubi_dbg_is_bgt_disabled(void) { return 0; } |
| 233 | +static inline int ubi_dbg_is_bitflip(void) { return 0; } |
| 234 | +static inline int ubi_dbg_is_write_failure(void) { return 0; } |
| 235 | +static inline int ubi_dbg_is_erase_failure(void) { return 0; } |
| 236 | +static inline int ubi_dbg_check_all_ff(struct ubi_device *ubi, |
| 237 | + int pnum, int offset, |
| 238 | + int len) { return 0; } |
| 239 | +static inline int ubi_dbg_check_write(struct ubi_device *ubi, |
| 240 | + const void *buf, int pnum, |
| 241 | + int offset, int len) { return 0; } |
229 | 242 |
|
230 | 243 | #endif /* !CONFIG_MTD_UBI_DEBUG */ |
231 | 244 | #endif /* !__UBI_DEBUG_H__ */ |
0 commit comments