aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-07-20 07:38:49 -0400
committerTom Rini <trini@konsulko.com>2022-07-20 07:38:49 -0400
commit88d931a71052fc8fb7b48126ae09aa875745d5ec (patch)
tree6868c39bd5186de775080818bfe5e5c875ca1366
parent319d309b58f863cbb8dcb240ace6af17dc98939b (diff)
parente2e6caa01ba97bcdb82100c6b928b5743e3aae6c (diff)
downloadu-boot-88d931a71052fc8fb7b48126ae09aa875745d5ec.zip
u-boot-88d931a71052fc8fb7b48126ae09aa875745d5ec.tar.gz
u-boot-88d931a71052fc8fb7b48126ae09aa875745d5ec.tar.bz2
Merge tag 'for-v2022.10' of https://source.denx.de/u-boot/custodians/u-boot-ubiWIP/20Jul2022
ubifs changes for 2022.10 UBIFS fixes from Pali Rohar: - ubifs: Fix ubifs_assert_cmt_locked - ubifs: Use U-Boot assert() from <log.h>
-rw-r--r--drivers/mtd/ubi/debug.h9
-rw-r--r--fs/ubifs/debug.h17
2 files changed, 5 insertions, 21 deletions
diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h
index 2c2faaf..9c8ce51 100644
--- a/drivers/mtd/ubi/debug.h
+++ b/drivers/mtd/ubi/debug.h
@@ -27,13 +27,8 @@ void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr);
} \
} while (0)
#else
-#define ubi_assert(expr) do { \
- if (unlikely(!(expr))) { \
- pr_debug("UBI assert failed in %s at %u\n", \
- __func__, __LINE__); \
- dump_stack(); \
- } \
-} while (0)
+#include <log.h>
+#define ubi_assert(expr) assert(expr)
#endif
#define ubi_dbg_print_hex_dump(ps, pt, r, g, b, len, a) \
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h
index 5f6e127..0ecc2e0 100644
--- a/fs/ubifs/debug.h
+++ b/fs/ubifs/debug.h
@@ -165,21 +165,10 @@ struct ubifs_global_debug_info {
dbg_snprintf_key(c, key, __tmp_key_buf, DBG_KEY_BUF_LEN)); \
} while (0)
#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 { \
- if (unlikely(down_write_trylock(&(c)->commit_sem))) { \
- up_write(&(c)->commit_sem); \
- pr_debug("commit lock is not locked!\n"); \
- ubifs_assert(0); \
- } \
-} while (0)
+#include <log.h>
+#define ubifs_assert(expr) assert(expr)
+#define ubifs_assert_cmt_locked(c) do { } while (0)
#define ubifs_dbg_msg(type, fmt, ...) \
pr_debug("UBIFS DBG " type ": " fmt "\n", \