From: Eran Matityahu Date: Wed, 13 Feb 2019 18:55:43 +0000 (+0200) Subject: mtd: ubi debug: Remove the pid print from ubi_assert X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=66e78fc196f59a9cd2688effa4d4d2eea32b0ed5;p=u-boot.git 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 Reviewed-by: Heiko Schocher --- 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 +#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)