mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
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:
parent
d0f08ef155
commit
828ddeb614
1 changed files with 13 additions and 4 deletions
|
|
@ -235,12 +235,21 @@ static inline void __qdf_bug(void)
|
|||
*
|
||||
* 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 { \
|
||||
pr_err("WLAN Panic @ %s:%d: " ftm "\n", \
|
||||
__func__, __LINE__, ##args); \
|
||||
pr_err("WLAN Panic @ %s:%d: " fmt "\n", func, line, ##args); \
|
||||
__qdf_bug(); \
|
||||
} while (false)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue