mtd: ubi debug: Remove the pid print from ubi_assert
[platform/kernel/u-boot.git] / drivers / mtd / ubi / debug.h
index 9b10fb9..d853520 100644 (file)
@@ -16,6 +16,9 @@ void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr);
 #include <linux/random.h>
 #endif
 
+#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",          \
@@ -23,9 +26,18 @@ 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(l, ps, pt, r, g, b, len, a)                   \
-               print_hex_dump(l, ps, pt, r, g, b, len, a)
+#define ubi_dbg_print_hex_dump(ps, pt, r, g, b, len, a)                      \
+               print_hex_dump(ps, pt, r, g, b, len, a)
 
 #define ubi_dbg_msg(type, fmt, ...) \
        pr_debug("UBI DBG " type " (pid %d): " fmt "\n", current->pid,       \