From ddcff963a252274fadacdf6837734bb06fd9ed3a Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Mon, 14 Oct 2019 16:50:18 -0700 Subject: [PATCH] qcacmn: Replace panic by QDF_DEBUG_PANIC Replace panic by QDF_DEBUG_PANIC because if PANIC_ON_BUG is compiled out, we do not want to panic the system. Change-Id: Idae89d6881ed5543273b047a0b77bc3ae55132b5 CRs-Fixed: 2545292 --- qdf/linux/src/i_qdf_util.h | 2 +- qdf/linux/src/qdf_mem.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/qdf/linux/src/i_qdf_util.h b/qdf/linux/src/i_qdf_util.h index 764152bdd84a..469320e6e02c 100644 --- a/qdf/linux/src/i_qdf_util.h +++ b/qdf/linux/src/i_qdf_util.h @@ -205,7 +205,7 @@ static inline bool __qdf_is_macaddr_equal(struct qdf_mac_addr *mac_addr1, qdf_err("Assertion failed! %s:%s %s:%d", \ #expr, __FUNCTION__, __FILE__, __LINE__); \ dump_stack(); \ - panic("Take care of the TARGET ASSERT first\n"); \ + QDF_DEBUG_PANIC("Take care of the TARGET ASSERT first\n"); \ } \ } while (0) diff --git a/qdf/linux/src/qdf_mem.c b/qdf/linux/src/qdf_mem.c index 73cdb547e58d..aba3fc6656ab 100644 --- a/qdf/linux/src/qdf_mem.c +++ b/qdf/linux/src/qdf_mem.c @@ -938,7 +938,8 @@ static void qdf_mem_domain_set_check_for_leaks(qdf_list_t *domains) leak_count += qdf_mem_domain_check_for_leaks(i, domains + i); if (leak_count) - panic("%u fatal memory leaks detected!", leak_count); + QDF_DEBUG_PANIC("%u fatal memory leaks detected!", + leak_count); } /** @@ -1029,7 +1030,8 @@ void qdf_mem_free_debug(void *ptr, const char *func, uint32_t line) return; if (qdf_unlikely((qdf_size_t)ptr <= sizeof(*header))) - panic("Failed to free invalid memory location %pK", ptr); + QDF_DEBUG_PANIC("Failed to free invalid memory location %pK", + ptr); qdf_talloc_assert_no_children_fl(ptr, func, line); @@ -1064,7 +1066,8 @@ void qdf_mem_check_for_leaks(void) leaks_count += qdf_mem_domain_check_for_leaks(current_domain, dma_list); if (leaks_count) - panic("%u fatal memory leaks detected!", leaks_count); + QDF_DEBUG_PANIC("%u fatal memory leaks detected!", + leaks_count); } /**