]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mtd: ubi debug: Remove the pid print from ubi_assert
authorEran Matityahu <eran.m@variscite.com>
Wed, 13 Feb 2019 18:55:43 +0000 (20:55 +0200)
committerHeiko Schocher <hs@denx.de>
Tue, 9 Apr 2019 05:46:31 +0000 (07:46 +0200)
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>
drivers/mtd/ubi/debug.h

index 8ad0c62733fac6eb14e7754780eddf44cccc7388..d853520108f19760f9f205f8d72f6c62cd70284a 100644 (file)
@@ -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)