• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisione2e6caa01ba97bcdb82100c6b928b5743e3aae6c (tree)
Time2022-07-20 12:50:13
AuthorPali Rohár <pali@kern...>
CommiterHeiko Schocher

Log Message

ubifs: Use U-Boot assert() from <log.h> in UBI/UBIFS code

U-Boot already provides assert function, so it use also in ubi and ubifs code.

Signed-off-by: Pali Rohár <pali@kernel.org>

Change Summary

Incremental Difference

--- 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);
2727 } \
2828 } while (0)
2929 #else
30-#define ubi_assert(expr) do { \
31- if (unlikely(!(expr))) { \
32- pr_debug("UBI assert failed in %s at %u\n", \
33- __func__, __LINE__); \
34- dump_stack(); \
35- } \
36-} while (0)
30+#include <log.h>
31+#define ubi_assert(expr) assert(expr)
3732 #endif
3833
3934 #define ubi_dbg_print_hex_dump(ps, pt, r, g, b, len, a) \
--- a/fs/ubifs/debug.h
+++ b/fs/ubifs/debug.h
@@ -165,14 +165,9 @@ struct ubifs_global_debug_info {
165165 dbg_snprintf_key(c, key, __tmp_key_buf, DBG_KEY_BUF_LEN)); \
166166 } while (0)
167167 #else
168-#define ubifs_assert(expr) do { \
169- if (unlikely(!(expr))) { \
170- pr_debug("UBIFS assert failed in %s at %u\n", \
171- __func__, __LINE__); \
172- dump_stack(); \
173- } \
174-} while (0)
175168
169+#include <log.h>
170+#define ubifs_assert(expr) assert(expr)
176171 #define ubifs_assert_cmt_locked(c) do { } while (0)
177172
178173 #define ubifs_dbg_msg(type, fmt, ...) \