UPSTREAM: 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__. Change-Id: I73cb2a932ad46bffffdce86250d4e08940d0aed9 Signed-off-by: Eran Matityahu <eran.m@variscite.com> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 66e78fc196f59a9cd2688effa4d4d2eea32b0ed5)
This commit is contained in:
parent
ebe7071926
commit
8ea7412056
|
|
@ -19,6 +19,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", \
|
||||
|
|
@ -26,6 +27,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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue