qcacmn: Featurize QDF_ASSERT
QDF_ASSERT is not properly featurized with its own build time config flag. This leads to unnecessary logs and increased driver size for platforms which do not want the feature enabled. Use the newly introduced WLAN_WARN_ON_ASSERT build time flag to decide if QDF_ASSERT should be a no-op. Change-Id: I39e3ab6499210569b6ce09d77ee72f0081741989 CRs-Fixed: 2211983
This commit is contained in:
@@ -164,6 +164,7 @@ static inline void __qdf_trace_noop(QDF_MODULE_ID module, char *format, ...) { }
|
||||
|
||||
#ifdef QDF_ENABLE_TRACING
|
||||
|
||||
#ifdef WLAN_WARN_ON_ASSERT
|
||||
#define QDF_ASSERT(_condition) \
|
||||
do { \
|
||||
if (!(_condition)) { \
|
||||
@@ -172,6 +173,14 @@ static inline void __qdf_trace_noop(QDF_MODULE_ID module, char *format, ...) { }
|
||||
WARN_ON(1); \
|
||||
} \
|
||||
} while (0)
|
||||
#else
|
||||
#define QDF_ASSERT(_condition) \
|
||||
do { \
|
||||
if (!(_condition)) { \
|
||||
/* no-op */ \
|
||||
} \
|
||||
} while (0)
|
||||
#endif /* WLAN_WARN_ON_ASSERT */
|
||||
|
||||
#else
|
||||
|
||||
|
Reference in New Issue
Block a user