| .. | .. |
|---|
| 166 | 166 | dbg_snprintf_key(c, key, __tmp_key_buf, DBG_KEY_BUF_LEN)); \ |
|---|
| 167 | 167 | } while (0) |
|---|
| 168 | 168 | #else |
|---|
| 169 | | -#define ubifs_assert(expr) do { \ |
|---|
| 170 | | - if (unlikely(!(expr))) { \ |
|---|
| 171 | | - pr_debug("UBIFS assert failed in %s at %u\n", \ |
|---|
| 172 | | - __func__, __LINE__); \ |
|---|
| 173 | | - dump_stack(); \ |
|---|
| 174 | | - } \ |
|---|
| 175 | | -} while (0) |
|---|
| 176 | 169 | |
|---|
| 177 | | -#define ubifs_assert_cmt_locked(c) do { \ |
|---|
| 178 | | - if (unlikely(down_write_trylock(&(c)->commit_sem))) { \ |
|---|
| 179 | | - up_write(&(c)->commit_sem); \ |
|---|
| 180 | | - pr_debug("commit lock is not locked!\n"); \ |
|---|
| 181 | | - ubifs_assert(0); \ |
|---|
| 182 | | - } \ |
|---|
| 183 | | -} while (0) |
|---|
| 170 | +#include <log.h> |
|---|
| 171 | +#define ubifs_assert(expr) assert(expr) |
|---|
| 172 | +#define ubifs_assert_cmt_locked(c) do { } while (0) |
|---|
| 184 | 173 | |
|---|
| 185 | 174 | #define ubifs_dbg_msg(type, fmt, ...) \ |
|---|
| 186 | 175 | pr_debug("UBIFS DBG " type ": " fmt "\n", \ |
|---|
| 187 | 176 | ##__VA_ARGS__) |
|---|
| 188 | 177 | |
|---|
| 189 | 178 | #define DBG_KEY_BUF_LEN 48 |
|---|
| 190 | | -#if defined CONFIG_MTD_DEBUG |
|---|
| 191 | 179 | #define ubifs_dbg_msg_key(type, key, fmt, ...) do { \ |
|---|
| 192 | 180 | char __tmp_key_buf[DBG_KEY_BUF_LEN]; \ |
|---|
| 193 | 181 | pr_debug("UBIFS DBG " type ": " fmt "%s\n", \ |
|---|
| 194 | 182 | ##__VA_ARGS__, \ |
|---|
| 195 | 183 | dbg_snprintf_key(c, key, __tmp_key_buf, DBG_KEY_BUF_LEN)); \ |
|---|
| 196 | 184 | } while (0) |
|---|
| 197 | | -#else |
|---|
| 198 | | -#define ubifs_dbg_msg_key(type, key, fmt, ...) do { \ |
|---|
| 199 | | - pr_debug("UBIFS DBG\n"); \ |
|---|
| 200 | | -} while (0) |
|---|
| 201 | | - |
|---|
| 202 | | -#endif |
|---|
| 203 | 185 | |
|---|
| 204 | 186 | #endif |
|---|
| 205 | 187 | |
|---|