qcacmn: Move panic messages into QDF_DEBUG_PANIC
QDF_DEBUG_PANIC has recently gained a reason parameter. Move instance of logging followed immediately by QDF_DEBUG_PANIC to single calls. Change-Id: Ifc00be410621005e8494074ed00b1b7e44cc6a03 CRs-Fixed: 2271769
This commit is contained in:
@@ -102,7 +102,8 @@ cfg_int_item_handler(struct cfg_value_store *store,
|
||||
|
||||
switch (meta->fallback) {
|
||||
default:
|
||||
QDF_DEBUG_PANIC();
|
||||
QDF_DEBUG_PANIC("Unknown fallback method %d for cfg item '%s'",
|
||||
meta->fallback, meta->name);
|
||||
/* fall through */
|
||||
case CFG_VALUE_OR_DEFAULT:
|
||||
/* store already contains default */
|
||||
@@ -155,7 +156,8 @@ cfg_uint_item_handler(struct cfg_value_store *store,
|
||||
|
||||
switch (meta->fallback) {
|
||||
default:
|
||||
QDF_DEBUG_PANIC();
|
||||
QDF_DEBUG_PANIC("Unknown fallback method %d for cfg item '%s'",
|
||||
meta->fallback, meta->name);
|
||||
/* fall through */
|
||||
case CFG_VALUE_OR_DEFAULT:
|
||||
/* store already contains default */
|
||||
@@ -428,10 +430,9 @@ static void cfg_store_free(struct cfg_value_store *store)
|
||||
qdf_spin_lock_bh(&__cfg_stores_lock);
|
||||
status = qdf_list_remove_node(&__cfg_stores_list, &store->node);
|
||||
qdf_spin_unlock_bh(&__cfg_stores_lock);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
cfg_err("Failed config store list removal; status:%d", status);
|
||||
QDF_DEBUG_PANIC();
|
||||
}
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
QDF_DEBUG_PANIC("Failed config store list removal; status:%d",
|
||||
status);
|
||||
|
||||
qdf_mem_free(store->path);
|
||||
qdf_mem_free(store);
|
||||
|
@@ -163,11 +163,6 @@ void qdf_mc_timer_manager_init(void)
|
||||
}
|
||||
qdf_export_symbol(qdf_mc_timer_manager_init);
|
||||
|
||||
static inline void qdf_mc_timer_panic(void)
|
||||
{
|
||||
QDF_DEBUG_PANIC();
|
||||
}
|
||||
|
||||
static void qdf_mc_timer_print_list(qdf_list_t *timers)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
@@ -200,7 +195,7 @@ void qdf_mc_timer_check_for_leaks(void)
|
||||
qdf_err("Timer leaks detected in %s domain!",
|
||||
qdf_debug_domain_name(current_domain));
|
||||
qdf_mc_timer_print_list(timers);
|
||||
qdf_mc_timer_panic();
|
||||
QDF_DEBUG_PANIC("Previously reported timer leaks detected");
|
||||
}
|
||||
|
||||
static void qdf_mc_timer_free_leaked_timers(qdf_list_t *timers)
|
||||
@@ -249,7 +244,7 @@ static void qdf_timer_clean(void)
|
||||
return;
|
||||
|
||||
/* panic, if enabled */
|
||||
qdf_mc_timer_panic();
|
||||
QDF_DEBUG_PANIC("Previously reported timer leaks detected");
|
||||
|
||||
/* if we didn't crash, release the leaked timers */
|
||||
for (i = 0; i < QDF_DEBUG_DOMAIN_COUNT; ++i)
|
||||
|
@@ -147,8 +147,7 @@ static void __qdf_flex_mem_free(struct qdf_flex_mem_pool *pool, void *ptr)
|
||||
return;
|
||||
}
|
||||
|
||||
qdf_err("Failed to find pointer in segment pool");
|
||||
QDF_DEBUG_PANIC();
|
||||
QDF_DEBUG_PANIC("Failed to find pointer in segment pool");
|
||||
}
|
||||
|
||||
void qdf_flex_mem_free(struct qdf_flex_mem_pool *pool, void *ptr)
|
||||
|
@@ -250,8 +250,7 @@ QDF_STATUS scheduler_post_msg_by_priority(QDF_MODULE_ID qid,
|
||||
}
|
||||
|
||||
if (msg->reserved != 0 && msg->reserved != SYS_MSG_COOKIE) {
|
||||
sched_err("Uninitialized scheduler message. Please initialize it");
|
||||
QDF_DEBUG_PANIC();
|
||||
QDF_DEBUG_PANIC("Scheduler messages must be initialized");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
|
@@ -85,8 +85,7 @@ static QDF_STATUS scheduler_all_queues_init(struct scheduler_ctx *sched_ctx)
|
||||
sched_enter();
|
||||
|
||||
if (!sched_ctx) {
|
||||
sched_err("sched_ctx is null");
|
||||
QDF_DEBUG_PANIC();
|
||||
QDF_DEBUG_PANIC("sched_ctx is null");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
@@ -116,8 +115,7 @@ static QDF_STATUS scheduler_all_queues_deinit(struct scheduler_ctx *sched_ctx)
|
||||
sched_enter();
|
||||
|
||||
if (!sched_ctx) {
|
||||
sched_err("sched_ctx is null");
|
||||
QDF_DEBUG_PANIC();
|
||||
QDF_DEBUG_PANIC("sched_ctx is null");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
@@ -178,8 +176,7 @@ QDF_STATUS scheduler_queues_init(struct scheduler_ctx *sched_ctx)
|
||||
sched_enter();
|
||||
|
||||
if (!sched_ctx) {
|
||||
sched_err("sched_ctx is null");
|
||||
QDF_DEBUG_PANIC();
|
||||
QDF_DEBUG_PANIC("sched_ctx is null");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
@@ -216,8 +213,7 @@ struct scheduler_msg *scheduler_core_msg_dup(struct scheduler_msg *msg)
|
||||
return dup;
|
||||
|
||||
buffer_full:
|
||||
sched_err("Scheduler buffer is full");
|
||||
QDF_DEBUG_PANIC();
|
||||
QDF_DEBUG_PANIC("Scheduler buffer is full");
|
||||
|
||||
dec_queue_count:
|
||||
qdf_atomic_dec(&__sched_queue_depth);
|
||||
@@ -239,8 +235,7 @@ static void scheduler_thread_process_queues(struct scheduler_ctx *sch_ctx,
|
||||
struct scheduler_msg *msg;
|
||||
|
||||
if (!sch_ctx) {
|
||||
sched_err("sch_ctx is null");
|
||||
QDF_DEBUG_PANIC();
|
||||
QDF_DEBUG_PANIC("sch_ctx is null");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -314,8 +309,7 @@ int scheduler_thread(void *arg)
|
||||
bool shutdown = false;
|
||||
|
||||
if (!arg) {
|
||||
sched_err("arg is null");
|
||||
QDF_DEBUG_PANIC();
|
||||
QDF_DEBUG_PANIC("arg is null");
|
||||
return 0;
|
||||
}
|
||||
qdf_set_user_nice(current, -2);
|
||||
@@ -336,10 +330,8 @@ int scheduler_thread(void *arg)
|
||||
qdf_atomic_test_bit(MC_SUSPEND_EVENT_MASK,
|
||||
&sch_ctx->sch_event_flag));
|
||||
|
||||
if (retWaitStatus == -ERESTARTSYS) {
|
||||
sched_err("wait_event_interruptible returned -ERESTARTSYS");
|
||||
QDF_DEBUG_PANIC();
|
||||
}
|
||||
if (retWaitStatus == -ERESTARTSYS)
|
||||
QDF_DEBUG_PANIC("Scheduler received -ERESTARTSYS");
|
||||
|
||||
qdf_atomic_clear_bit(MC_POST_EVENT_MASK, &sch_ctx->sch_event_flag);
|
||||
scheduler_thread_process_queues(sch_ctx, &shutdown);
|
||||
|
Reference in New Issue
Block a user