summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorEran Matityahu <eran.m@variscite.com>2019-02-13 20:55:43 +0200
committerHeiko Schocher <hs@denx.de>2019-04-09 07:46:31 +0200
commit66e78fc196f59a9cd2688effa4d4d2eea32b0ed5 (patch)
tree4c84e6006ff13392de4e8777a1a2b40d6581980e /drivers/mtd
parent3c99166441bf3ea325af2da83cfe65430b49c066 (diff)
mtd: ubi debug: Remove the pid print from ubi_assert
Add a new definition for ubi_assert and keep the original one in an ifndef __UBOOT__. Signed-off-by: Eran Matityahu <eran.m@variscite.com> Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/ubi/debug.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h
index 8ad0c62733..d853520108 100644
--- a/drivers/mtd/ubi/debug.h
+++ b/drivers/mtd/ubi/debug.h
@@ -18,6 +18,7 @@ void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr);
#include <hexdump.h>
+#ifndef __UBOOT__
#define ubi_assert(expr) do { \
if (unlikely(!(expr))) { \
pr_crit("UBI assert failed in %s at %u (pid %d)\n", \
@@ -25,6 +26,15 @@ void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr);
dump_stack(); \
} \
} while (0)
+#else
+#define ubi_assert(expr) do { \
+ if (unlikely(!(expr))) { \
+ pr_crit("UBI assert failed in %s at %u\n", \
+ __func__, __LINE__); \
+ dump_stack(); \
+ } \
+} while (0)
+#endif
#define ubi_dbg_print_hex_dump(ps, pt, r, g, b, len, a) \
print_hex_dump(ps, pt, r, g, b, len, a)