Skip to content

Commit

Permalink
mtd: ubi debug: Remove the pid print from ubi_assert
Browse files Browse the repository at this point in the history
Add a new definition for ubi_assert and keep
the original one in an ifndef __UBOOT__.

Signed-off-by: Eran Matityahu <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
  • Loading branch information
eranmati authored and hsdenx committed Apr 9, 2019
1 parent 3c99166 commit 66e78fc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/mtd/ubi/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,23 @@ 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", \
__func__, __LINE__, current->pid); \
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)
Expand Down

0 comments on commit 66e78fc

Please sign in to comment.