修訂 | 88d931a71052fc8fb7b48126ae09aa875745d5ec (tree) |
---|---|
時間 | 2022-07-20 20:38:49 |
作者 | Tom Rini <trini@kons...> |
Commiter | Tom Rini |
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>
@@ -27,13 +27,8 @@ void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr); | ||
27 | 27 | } \ |
28 | 28 | } while (0) |
29 | 29 | #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) | |
37 | 32 | #endif |
38 | 33 | |
39 | 34 | #define ubi_dbg_print_hex_dump(ps, pt, r, g, b, len, a) \ |
@@ -165,21 +165,10 @@ struct ubifs_global_debug_info { | ||
165 | 165 | dbg_snprintf_key(c, key, __tmp_key_buf, DBG_KEY_BUF_LEN)); \ |
166 | 166 | } while (0) |
167 | 167 | #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) | |
175 | 168 | |
176 | -#define ubifs_assert_cmt_locked(c) do { \ | |
177 | - if (unlikely(down_write_trylock(&(c)->commit_sem))) { \ | |
178 | - up_write(&(c)->commit_sem); \ | |
179 | - pr_debug("commit lock is not locked!\n"); \ | |
180 | - ubifs_assert(0); \ | |
181 | - } \ | |
182 | -} while (0) | |
169 | +#include <log.h> | |
170 | +#define ubifs_assert(expr) assert(expr) | |
171 | +#define ubifs_assert_cmt_locked(c) do { } while (0) | |
183 | 172 | |
184 | 173 | #define ubifs_dbg_msg(type, fmt, ...) \ |
185 | 174 | pr_debug("UBIFS DBG " type ": " fmt "\n", \ |