فهرست منبع

qcacmn: During qdf assert don't print generic failure information

During qdf assert generic failure information printed at last is misleading
failure reason, to avoid this don't print generic failure information.

Change-Id: I55359b2e41a3ee50de4e45e73183f2480c28a1eb
CRs-Fixed: 2789137
Karthik Kantamneni 4 سال پیش
والد
کامیت
6ef375e0fb
2فایلهای تغییر یافته به همراه15 افزوده شده و 1 حذف شده
  1. 14 0
      qdf/linux/src/i_qdf_trace.h
  2. 1 1
      qdf/linux/src/i_qdf_util.h

+ 14 - 0
qdf/linux/src/i_qdf_trace.h

@@ -414,6 +414,13 @@ static inline void __qdf_bug(void)
 		} \
 	} while (0)
 
+#define QDF_BUG_ON_ASSERT(_condition) \
+	do { \
+		if (!(_condition)) { \
+			__qdf_bug(); \
+		} \
+	} while (0)
+
 #else /* PANIC_ON_BUG */
 
 #define QDF_DEBUG_PANIC(reason...) \
@@ -433,6 +440,13 @@ static inline void __qdf_bug(void)
 		} \
 	} while (0)
 
+#define QDF_BUG_ON_ASSERT(_condition) \
+	do { \
+		if (!(_condition)) { \
+			/* no-op */ \
+		} \
+	} while (0)
+
 #endif /* PANIC_ON_BUG */
 
 #ifdef KSYM_SYMBOL_LEN

+ 1 - 1
qdf/linux/src/i_qdf_util.h

@@ -211,7 +211,7 @@ static inline bool __qdf_is_macaddr_equal(struct qdf_mac_addr *mac_addr1,
 			pr_err("Assertion failed! %s:%s %s:%d\n", \
 			       # expr, __func__, __FILE__, __LINE__); \
 			dump_stack(); \
-			QDF_BUG(0); \
+			QDF_BUG_ON_ASSERT(0); \
 		} \
 } while (0)