qcacld-2.0: Add adf_print and ADF_BUG implementation
Add adf_print API to print error logs from ADF module. Add ADF_BUG implementation to warn in case crash is not required. Change-Id: If4ba15c669cf5d6769cb7850314cd3bd66f8fd90 CRs-Fixed: 1074129
This commit is contained in:
parent
80efc95cd1
commit
c8e905d1ab
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
@ -136,6 +136,9 @@ typedef struct adf_os_sglist{
|
|||
|
||||
}adf_os_sglist_t;
|
||||
|
||||
#define adf_print(args...) \
|
||||
VOS_TRACE(VOS_MODULE_ID_ADF, VOS_TRACE_LEVEL_ERROR, ## args)
|
||||
|
||||
/**
|
||||
* @brief All operations specified below are performed from
|
||||
* the host memory point of view, where a read
|
||||
|
|
|
@ -51,12 +51,26 @@
|
|||
/* compile specific macro to get the function name string */
|
||||
#define _A_FUNCNAME_ __func__
|
||||
|
||||
#ifdef PANIC_ON_BUG
|
||||
|
||||
#define ADF_BUG(_condition) do { \
|
||||
if (!(_condition)) { \
|
||||
printk(KERN_CRIT "ADF BUG in %s Line %d\n", \
|
||||
__func__, __LINE__); \
|
||||
BUG_ON(1); \
|
||||
} \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
|
||||
#define ADF_BUG(_condition) do { \
|
||||
if (!(_condition)) { \
|
||||
printk(KERN_CRIT "ADF BUG in %s Line %d\n", \
|
||||
__func__, __LINE__); \
|
||||
WARN_ON(1); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _DEBUG_LINUX_H_ */
|
||||
|
|
Loading…
Reference in New Issue