diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-16 12:53:46 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-16 12:53:46 -0400 |
commit | f70b7e52aa23c9aea5346b9730b402fb55f9079b (patch) | |
tree | 20882b6e8345b8836d395248fd7f31fce7d09236 /fs/ubifs/debug.h | |
parent | 1baafd28dc17422f10be9b2a3a75432154e3abc7 (diff) |
UBIFS: remove Kconfig debugging option
Have the debugging stuff always compiled-in instead. It simplifies maintanance
a lot.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'fs/ubifs/debug.h')
-rw-r--r-- | fs/ubifs/debug.h | 153 |
1 files changed, 0 insertions, 153 deletions
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h index b34aeff07523..7a6a9e279df1 100644 --- a/fs/ubifs/debug.h +++ b/fs/ubifs/debug.h | |||
@@ -29,8 +29,6 @@ typedef int (*dbg_leaf_callback)(struct ubifs_info *c, | |||
29 | typedef int (*dbg_znode_callback)(struct ubifs_info *c, | 29 | typedef int (*dbg_znode_callback)(struct ubifs_info *c, |
30 | struct ubifs_znode *znode, void *priv); | 30 | struct ubifs_znode *znode, void *priv); |
31 | 31 | ||
32 | #ifdef CONFIG_UBIFS_FS_DEBUG | ||
33 | |||
34 | /* | 32 | /* |
35 | * The UBIFS debugfs directory name pattern and maximum name length (3 for "ubi" | 33 | * The UBIFS debugfs directory name pattern and maximum name length (3 for "ubi" |
36 | * + 1 for "_" and plus 2x2 for 2 UBI numbers and 1 for the trailing zero byte. | 34 | * + 1 for "_" and plus 2x2 for 2 UBI numbers and 1 for the trailing zero byte. |
@@ -317,155 +315,4 @@ void dbg_debugfs_exit(void); | |||
317 | int dbg_debugfs_init_fs(struct ubifs_info *c); | 315 | int dbg_debugfs_init_fs(struct ubifs_info *c); |
318 | void dbg_debugfs_exit_fs(struct ubifs_info *c); | 316 | void dbg_debugfs_exit_fs(struct ubifs_info *c); |
319 | 317 | ||
320 | #else /* !CONFIG_UBIFS_FS_DEBUG */ | ||
321 | |||
322 | /* Use "if (0)" to make compiler check arguments even if debugging is off */ | ||
323 | #define ubifs_assert(expr) do { \ | ||
324 | if (0) \ | ||
325 | printk(KERN_CRIT "UBIFS assert failed in %s at %u (pid %d)\n", \ | ||
326 | __func__, __LINE__, current->pid); \ | ||
327 | } while (0) | ||
328 | |||
329 | #define dbg_err(fmt, ...) do { \ | ||
330 | if (0) \ | ||
331 | ubifs_err(fmt, ##__VA_ARGS__); \ | ||
332 | } while (0) | ||
333 | |||
334 | #define ubifs_dbg_msg(fmt, ...) do { \ | ||
335 | if (0) \ | ||
336 | printk(KERN_DEBUG fmt "\n", ##__VA_ARGS__); \ | ||
337 | } while (0) | ||
338 | |||
339 | #define ubifs_assert_cmt_locked(c) | ||
340 | |||
341 | #define dbg_msg(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
342 | #define dbg_gen(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
343 | #define dbg_jnl(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
344 | #define dbg_jnlk(key, fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
345 | #define dbg_tnc(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
346 | #define dbg_tnck(key, fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
347 | #define dbg_lp(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
348 | #define dbg_find(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
349 | #define dbg_mnt(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
350 | #define dbg_mntk(key, fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
351 | #define dbg_io(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
352 | #define dbg_cmt(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
353 | #define dbg_budg(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
354 | #define dbg_log(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
355 | #define dbg_gc(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
356 | #define dbg_scan(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
357 | #define dbg_rcvry(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__) | ||
358 | |||
359 | static inline int ubifs_debugging_init(struct ubifs_info *c) { return 0; } | ||
360 | static inline void ubifs_debugging_exit(struct ubifs_info *c) { return; } | ||
361 | static inline const char *dbg_ntype(int type) { return ""; } | ||
362 | static inline const char *dbg_cstate(int cmt_state) { return ""; } | ||
363 | static inline const char *dbg_jhead(int jhead) { return ""; } | ||
364 | static inline const char * | ||
365 | dbg_get_key_dump(const struct ubifs_info *c, | ||
366 | const union ubifs_key *key) { return ""; } | ||
367 | static inline const char * | ||
368 | dbg_snprintf_key(const struct ubifs_info *c, | ||
369 | const union ubifs_key *key, char *buffer, | ||
370 | int len) { return ""; } | ||
371 | static inline void ubifs_dump_inode(struct ubifs_info *c, | ||
372 | const struct inode *inode) { return; } | ||
373 | static inline void ubifs_dump_node(const struct ubifs_info *c, | ||
374 | const void *node) { return; } | ||
375 | static inline void | ||
376 | ubifs_dump_budget_req(const struct ubifs_budget_req *req) { return; } | ||
377 | static inline void | ||
378 | ubifs_dump_lstats(const struct ubifs_lp_stats *lst) { return; } | ||
379 | static inline void | ||
380 | ubifs_dump_budg(struct ubifs_info *c, | ||
381 | const struct ubifs_budg_info *bi) { return; } | ||
382 | static inline void ubifs_dump_lprop(const struct ubifs_info *c, | ||
383 | const struct ubifs_lprops *lp){ return; } | ||
384 | static inline void ubifs_dump_lprops(struct ubifs_info *c) { return; } | ||
385 | static inline void ubifs_dump_lpt_info(struct ubifs_info *c) { return; } | ||
386 | static inline void ubifs_dump_leb(const struct ubifs_info *c, | ||
387 | int lnum) { return; } | ||
388 | static inline void | ||
389 | ubifs_dump_sleb(const struct ubifs_info *c, | ||
390 | const struct ubifs_scan_leb *sleb, int offs) { return; } | ||
391 | static inline void | ||
392 | ubifs_dump_znode(const struct ubifs_info *c, | ||
393 | const struct ubifs_znode *znode) { return; } | ||
394 | static inline void ubifs_dump_heap(struct ubifs_info *c, | ||
395 | struct ubifs_lpt_heap *heap, | ||
396 | int cat) { return; } | ||
397 | static inline void ubifs_dump_pnode(struct ubifs_info *c, | ||
398 | struct ubifs_pnode *pnode, | ||
399 | struct ubifs_nnode *parent, | ||
400 | int iip) { return; } | ||
401 | static inline void ubifs_dump_tnc(struct ubifs_info *c) { return; } | ||
402 | static inline void ubifs_dump_index(struct ubifs_info *c) { return; } | ||
403 | static inline void ubifs_dump_lpt_lebs(const struct ubifs_info *c){ return; } | ||
404 | |||
405 | static inline int dbg_walk_index(struct ubifs_info *c, | ||
406 | dbg_leaf_callback leaf_cb, | ||
407 | dbg_znode_callback znode_cb, | ||
408 | void *priv) { return 0; } | ||
409 | static inline void dbg_save_space_info(struct ubifs_info *c) { return; } | ||
410 | static inline int dbg_check_space_info(struct ubifs_info *c) { return 0; } | ||
411 | static inline int dbg_check_lprops(struct ubifs_info *c) { return 0; } | ||
412 | static inline int | ||
413 | dbg_old_index_check_init(struct ubifs_info *c, | ||
414 | struct ubifs_zbranch *zroot) { return 0; } | ||
415 | static inline int | ||
416 | dbg_check_old_index(struct ubifs_info *c, | ||
417 | struct ubifs_zbranch *zroot) { return 0; } | ||
418 | static inline int dbg_check_cats(struct ubifs_info *c) { return 0; } | ||
419 | static inline int dbg_check_ltab(struct ubifs_info *c) { return 0; } | ||
420 | static inline int dbg_chk_lpt_free_spc(struct ubifs_info *c) { return 0; } | ||
421 | static inline int dbg_chk_lpt_sz(struct ubifs_info *c, | ||
422 | int action, int len) { return 0; } | ||
423 | static inline int | ||
424 | dbg_check_synced_i_size(const struct ubifs_info *c, | ||
425 | struct inode *inode) { return 0; } | ||
426 | static inline int dbg_check_dir(struct ubifs_info *c, | ||
427 | const struct inode *dir) { return 0; } | ||
428 | static inline int dbg_check_tnc(struct ubifs_info *c, int extra) { return 0; } | ||
429 | static inline int dbg_check_idx_size(struct ubifs_info *c, | ||
430 | long long idx_size) { return 0; } | ||
431 | static inline int dbg_check_filesystem(struct ubifs_info *c) { return 0; } | ||
432 | static inline void dbg_check_heap(struct ubifs_info *c, | ||
433 | struct ubifs_lpt_heap *heap, | ||
434 | int cat, int add_pos) { return; } | ||
435 | static inline int dbg_check_lpt_nodes(struct ubifs_info *c, | ||
436 | struct ubifs_cnode *cnode, int row, int col) { return 0; } | ||
437 | static inline int dbg_check_inode_size(struct ubifs_info *c, | ||
438 | const struct inode *inode, | ||
439 | loff_t size) { return 0; } | ||
440 | static inline int | ||
441 | dbg_check_data_nodes_order(struct ubifs_info *c, | ||
442 | struct list_head *head) { return 0; } | ||
443 | static inline int | ||
444 | dbg_check_nondata_nodes_order(struct ubifs_info *c, | ||
445 | struct list_head *head) { return 0; } | ||
446 | |||
447 | static inline int dbg_leb_write(struct ubifs_info *c, int lnum, | ||
448 | const void *buf, int offset, | ||
449 | int len, int dtype) { return 0; } | ||
450 | static inline int dbg_leb_change(struct ubifs_info *c, int lnum, | ||
451 | const void *buf, int len, | ||
452 | int dtype) { return 0; } | ||
453 | static inline int dbg_leb_unmap(struct ubifs_info *c, int lnum) { return 0; } | ||
454 | static inline int dbg_leb_map(struct ubifs_info *c, int lnum, | ||
455 | int dtype) { return 0; } | ||
456 | |||
457 | static inline int dbg_is_chk_gen(const struct ubifs_info *c) { return 0; } | ||
458 | static inline int dbg_is_chk_index(const struct ubifs_info *c) { return 0; } | ||
459 | static inline int dbg_is_chk_orph(const struct ubifs_info *c) { return 0; } | ||
460 | static inline int dbg_is_chk_lprops(const struct ubifs_info *c) { return 0; } | ||
461 | static inline int dbg_is_chk_fs(const struct ubifs_info *c) { return 0; } | ||
462 | static inline int dbg_is_tst_rcvry(const struct ubifs_info *c) { return 0; } | ||
463 | static inline int dbg_is_power_cut(const struct ubifs_info *c) { return 0; } | ||
464 | |||
465 | static inline int dbg_debugfs_init(void) { return 0; } | ||
466 | static inline void dbg_debugfs_exit(void) { return; } | ||
467 | static inline int dbg_debugfs_init_fs(struct ubifs_info *c) { return 0; } | ||
468 | static inline int dbg_debugfs_exit_fs(struct ubifs_info *c) { return 0; } | ||
469 | |||
470 | #endif /* !CONFIG_UBIFS_FS_DEBUG */ | ||
471 | #endif /* !__UBIFS_DEBUG_H__ */ | 318 | #endif /* !__UBIFS_DEBUG_H__ */ |