|
@@ -41,7 +41,7 @@
|
|
|
QDF_STATUS qdf_mutex_create(qdf_mutex_t *lock, const char *func, int line)
|
|
|
{
|
|
|
/* check for invalid pointer */
|
|
|
- if (lock == NULL) {
|
|
|
+ if (!lock) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
|
|
"%s: NULL pointer passed in", __func__);
|
|
|
return QDF_STATUS_E_FAULT;
|
|
@@ -90,7 +90,7 @@ QDF_STATUS qdf_mutex_acquire(qdf_mutex_t *lock)
|
|
|
{
|
|
|
int rc;
|
|
|
/* check for invalid pointer */
|
|
|
- if (lock == NULL) {
|
|
|
+ if (!lock) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
|
|
"%s: NULL pointer passed in", __func__);
|
|
|
QDF_ASSERT(0);
|
|
@@ -168,7 +168,7 @@ qdf_export_symbol(qdf_mutex_acquire);
|
|
|
QDF_STATUS qdf_mutex_release(qdf_mutex_t *lock)
|
|
|
{
|
|
|
/* check for invalid pointer */
|
|
|
- if (lock == NULL) {
|
|
|
+ if (!lock) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
|
|
"%s: NULL pointer passed in", __func__);
|
|
|
QDF_ASSERT(0);
|
|
@@ -407,7 +407,7 @@ QDF_STATUS qdf_runtime_pm_get(void)
|
|
|
|
|
|
ol_sc = cds_get_context(QDF_MODULE_ID_HIF);
|
|
|
|
|
|
- if (ol_sc == NULL) {
|
|
|
+ if (!ol_sc) {
|
|
|
QDF_ASSERT(0);
|
|
|
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
|
|
"%s: HIF context is null!", __func__);
|
|
@@ -440,7 +440,7 @@ QDF_STATUS qdf_runtime_pm_put(void)
|
|
|
|
|
|
ol_sc = cds_get_context(QDF_MODULE_ID_HIF);
|
|
|
|
|
|
- if (ol_sc == NULL) {
|
|
|
+ if (!ol_sc) {
|
|
|
QDF_ASSERT(0);
|
|
|
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
|
|
"%s: HIF context is null!", __func__);
|
|
@@ -470,7 +470,7 @@ QDF_STATUS qdf_runtime_pm_prevent_suspend(qdf_runtime_lock_t *lock)
|
|
|
|
|
|
ol_sc = cds_get_context(QDF_MODULE_ID_HIF);
|
|
|
|
|
|
- if (ol_sc == NULL) {
|
|
|
+ if (!ol_sc) {
|
|
|
QDF_ASSERT(0);
|
|
|
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
|
|
"%s: HIF context is null!", __func__);
|
|
@@ -499,7 +499,7 @@ QDF_STATUS qdf_runtime_pm_allow_suspend(qdf_runtime_lock_t *lock)
|
|
|
int ret;
|
|
|
|
|
|
ol_sc = cds_get_context(QDF_MODULE_ID_HIF);
|
|
|
- if (ol_sc == NULL) {
|
|
|
+ if (!ol_sc) {
|
|
|
QDF_ASSERT(0);
|
|
|
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
|
|
"%s: HIF context is null!", __func__);
|
|
@@ -640,7 +640,7 @@ qdf_export_symbol(qdf_spinlock_release);
|
|
|
QDF_STATUS qdf_mutex_destroy(qdf_mutex_t *lock)
|
|
|
{
|
|
|
/* check for invalid pointer */
|
|
|
- if (NULL == lock) {
|
|
|
+ if (!lock) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
|
|
"%s: NULL pointer passed in", __func__);
|
|
|
return QDF_STATUS_E_FAULT;
|
|
@@ -728,7 +728,7 @@ static bool qdf_is_lock_cookie_free(struct qdf_lock_cookie *lock_cookie)
|
|
|
{
|
|
|
struct qdf_lock_cookie *tmp = lock_cookie->u.empty_node.next;
|
|
|
|
|
|
- return qdf_is_lock_cookie(tmp) || (tmp == NULL);
|
|
|
+ return qdf_is_lock_cookie(tmp) || (!tmp);
|
|
|
}
|
|
|
|
|
|
static struct qdf_lock_cookie *qdf_get_lock_cookie(void)
|
|
@@ -798,7 +798,7 @@ void qdf_lock_stats_cookie_create(struct lock_stats *stats,
|
|
|
{
|
|
|
struct qdf_lock_cookie *cookie = qdf_get_lock_cookie();
|
|
|
|
|
|
- if (cookie == NULL) {
|
|
|
+ if (!cookie) {
|
|
|
int count;
|
|
|
|
|
|
qdf_atomic_inc(&lock_cookie_get_failures);
|