drivers: Convert DEBUGASSERT(false) into more intuitive DEBUGPANIC()

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
Gustavo Henrique Nihei 2022-07-13 14:34:54 -03:00 committed by Xiang Xiao
parent e24621d545
commit e999708b31
8 changed files with 10 additions and 10 deletions

View File

@ -155,7 +155,7 @@ static int onewire_pm_prepare(FAR struct pm_callback_s *cb, int domain,
if (nxsem_get_value(&master->devsem.sem, &sval) < 0)
{
DEBUGASSERT(false);
DEBUGPANIC();
return -EINVAL;
}

View File

@ -1165,7 +1165,7 @@ static int can_poll(FAR struct file *filep, FAR struct pollfd *fds,
if (ret < 0)
{
DEBUGASSERT(false);
DEBUGPANIC();
goto return_with_irqdisabled;
}
else if (sval > 0)
@ -1406,7 +1406,7 @@ int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr,
sval = 0;
if (nxsem_get_value(&fifo->rx_sem, &sval) < 0)
{
DEBUGASSERT(false);
DEBUGPANIC();
#ifdef CONFIG_CAN_ERRORS
/* Report unspecified error */

View File

@ -760,7 +760,7 @@ static int foc_notifier(FAR struct foc_dev_s *dev,
{
/* This is a critical fault */
DEBUGASSERT(0);
DEBUGPANIC();
/* Set timeout fault if not in debug mode */

View File

@ -1760,7 +1760,7 @@ static void enc_rxabtif(FAR struct enc_driver_s *priv)
descr = (FAR struct enc_descr_s *)sq_next(descr);
}
DEBUGASSERT(false);
DEBUGPANIC();
#endif
descr = (FAR struct enc_descr_s *)sq_peek(&priv->rxqueue);

View File

@ -785,7 +785,7 @@ static void lan91c111_txdone(FAR struct net_driver_s *dev)
}
else
{
DEBUGASSERT(0);
DEBUGPANIC();
}
}

View File

@ -744,7 +744,7 @@ static int bq2429x_health(FAR struct battery_charger_dev_s *dev,
break; /* No return, check for other faults */
default:
DEBUGASSERT(false);
DEBUGPANIC();
*health = BATTERY_HEALTH_UNKNOWN;
return OK;
}

View File

@ -1408,7 +1408,7 @@ static void cdcecm_mkepdesc(int epidx,
break;
default:
DEBUGASSERT(false);
DEBUGPANIC();
}
}

View File

@ -565,7 +565,7 @@ int bcmf_core_upload_firmware(FAR struct bcmf_sdio_dev_s *sbus)
#endif
default:
DEBUGASSERT(false);
DEBUGPANIC();
}
nxsig_usleep(50 * 1000);
@ -668,7 +668,7 @@ int bcmf_core_upload_firmware(FAR struct bcmf_sdio_dev_s *sbus)
#endif
default:
DEBUGASSERT(false);
DEBUGPANIC();
}
return OK;