qcacmn: Add QDF_DEBUG_PANIC API

A very common pattern in the Wlan driver is to test for a fatal
condition, and then call QDF_BUG with some falsy value. Add a sugar
API for these cases, which effectively does 'QDF_BUG(false)'.
Additionally, include 'debug' in the name to remind consumers that
the panic will not occur on end user devices.

Current syntax:

	if (fatal_condition)
		QDF_BUG(false);

New syntax:

	if (fatal_condition)
		QDF_DEBUG_PANIC();

Change-Id: Ifa03e9109be5efdbd061ca32363d5719fb91da0f
CRs-Fixed: 2191582
This commit is contained in:
Dustin Brown
2018-01-26 16:31:03 -08:00
committed by snandini
parent 2850421a77
commit 47452e942b
2 changed files with 8 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -174,7 +174,7 @@ EXPORT_SYMBOL(qdf_mc_timer_manager_init);
static inline void qdf_mc_timer_panic(void)
{
QDF_BUG(0);
QDF_DEBUG_PANIC();
}
static void qdf_mc_timer_print_list(qdf_list_t *timers)