qcacmn: Add QDF_DEBUG_PANIC_FL macro
For logic that builds on top of QDF_DEBUG_PANIC(), it would be useful to be able to specify function and line number explicitly. Add QDF_DEBUG_PANIC_FL(), which is QDF_DEBUG_PANIC with explicit function and line number parameters. Change-Id: Idc79f2fb0e769930167766f21a54a82c4b7ff40a CRs-Fixed: 2276964
This commit is contained in:
@@ -235,12 +235,21 @@ static inline void __qdf_bug(void)
|
|||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
#define QDF_DEBUG_PANIC(reason...) __QDF_DEBUG_PANIC("" reason)
|
#define QDF_DEBUG_PANIC(reason...) \
|
||||||
|
QDF_DEBUG_PANIC_FL(__func__, __LINE__, "" reason)
|
||||||
|
|
||||||
#define __QDF_DEBUG_PANIC(ftm, args...) \
|
/**
|
||||||
|
* QDF_DEBUG_PANIC_FL() - In debug builds, panic, otherwise do nothing
|
||||||
|
* @func: origin function name to be logged
|
||||||
|
* @line: origin line number to be logged
|
||||||
|
* @fmt: printf compatible format string to be logged
|
||||||
|
* @args: zero or more printf compatible logging arguments
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
#define QDF_DEBUG_PANIC_FL(func, line, fmt, args...) \
|
||||||
do { \
|
do { \
|
||||||
pr_err("WLAN Panic @ %s:%d: " ftm "\n", \
|
pr_err("WLAN Panic @ %s:%d: " fmt "\n", func, line, ##args); \
|
||||||
__func__, __LINE__, ##args); \
|
|
||||||
__qdf_bug(); \
|
__qdf_bug(); \
|
||||||
} while (false)
|
} while (false)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user