mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 06:00:43 +00:00
Merge tag 'for-v2022.10' of https://source.denx.de/u-boot/custodians/u-boot-ubi
ubifs changes for 2022.10 UBIFS fixes from Pali Rohar: - ubifs: Fix ubifs_assert_cmt_locked - ubifs: Use U-Boot assert() from <log.h>
This commit is contained in:
commit
88d931a710
2 changed files with 5 additions and 21 deletions
|
@ -27,13 +27,8 @@ void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr);
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
#else
|
#else
|
||||||
#define ubi_assert(expr) do { \
|
#include <log.h>
|
||||||
if (unlikely(!(expr))) { \
|
#define ubi_assert(expr) assert(expr)
|
||||||
pr_debug("UBI assert failed in %s at %u\n", \
|
|
||||||
__func__, __LINE__); \
|
|
||||||
dump_stack(); \
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ubi_dbg_print_hex_dump(ps, pt, r, g, b, len, a) \
|
#define ubi_dbg_print_hex_dump(ps, pt, r, g, b, len, a) \
|
||||||
|
|
|
@ -165,21 +165,10 @@ struct ubifs_global_debug_info {
|
||||||
dbg_snprintf_key(c, key, __tmp_key_buf, DBG_KEY_BUF_LEN)); \
|
dbg_snprintf_key(c, key, __tmp_key_buf, DBG_KEY_BUF_LEN)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#else
|
#else
|
||||||
#define ubifs_assert(expr) do { \
|
|
||||||
if (unlikely(!(expr))) { \
|
|
||||||
pr_debug("UBIFS assert failed in %s at %u\n", \
|
|
||||||
__func__, __LINE__); \
|
|
||||||
dump_stack(); \
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define ubifs_assert_cmt_locked(c) do { \
|
#include <log.h>
|
||||||
if (unlikely(down_write_trylock(&(c)->commit_sem))) { \
|
#define ubifs_assert(expr) assert(expr)
|
||||||
up_write(&(c)->commit_sem); \
|
#define ubifs_assert_cmt_locked(c) do { } while (0)
|
||||||
pr_debug("commit lock is not locked!\n"); \
|
|
||||||
ubifs_assert(0); \
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define ubifs_dbg_msg(type, fmt, ...) \
|
#define ubifs_dbg_msg(type, fmt, ...) \
|
||||||
pr_debug("UBIFS DBG " type ": " fmt "\n", \
|
pr_debug("UBIFS DBG " type ": " fmt "\n", \
|
||||||
|
|
Loading…
Reference in a new issue