You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/09/23 00:57:45 UTC
(nuttx) 09/19: Thermal: remove assert of thermal_zone_device_update()
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit f96d3798a1ccc9bbb5176874f5c9e19f8bc0f3af
Author: wangjianyu3 <wa...@xiaomi.com>
AuthorDate: Mon Dec 11 21:41:14 2023 +0800
Thermal: remove assert of thermal_zone_device_update()
Called by both of lpwork and Idle_Task:
[ 0.000000] [ 0] [ INFO] [ap] thermal_zone_device_register: Registered zone device cpu-thermal
[ 0.000000] [ 0] [ EMERG] [ap] _assert: Current Version: NuttX ap 0.0.0 Dec 11 2023 20:59:20 sim
[ 0.000000] [ 0] [ EMERG] [ap] _assert: Assertion failed : at file: thermal/thermal_core.c:820 task: Idle_Task process: Kernel 0x32ade29
Signed-off-by: wangjianyu3 <wa...@xiaomi.com>
---
drivers/thermal/thermal_core.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index d430c01200..619194857c 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -27,7 +27,6 @@
#include <nuttx/power/pm.h>
#endif
-#include <assert.h>
#include <debug.h>
#include <stdio.h>
#include <sys/boardctl.h>
@@ -291,15 +290,11 @@ static void thermal_pm_notify(FAR struct pm_callback_s *cb, int domain,
{
case PM_SLEEP:
{
- nxmutex_lock(&g_thermal_lock);
-
list_for_every_entry(&g_zone_dev_list, zdev,
struct thermal_zone_device_s, node)
{
work_cancel(LPWORK, &zdev->monitor);
}
-
- nxmutex_unlock(&g_thermal_lock);
}
break;
case PM_RESTORE:
@@ -307,8 +302,6 @@ static void thermal_pm_notify(FAR struct pm_callback_s *cb, int domain,
case PM_IDLE:
case PM_STANDBY:
{
- nxmutex_lock(&g_thermal_lock);
-
list_for_every_entry(&g_zone_dev_list, zdev,
struct thermal_zone_device_s, node)
{
@@ -319,8 +312,6 @@ static void thermal_pm_notify(FAR struct pm_callback_s *cb, int domain,
zdev->params->polling_delay);
}
}
-
- nxmutex_unlock(&g_thermal_lock);
}
break;
default:
@@ -816,8 +807,6 @@ void thermal_zone_device_update(FAR struct thermal_zone_device_s *zdev)
int temp;
int ret;
- DEBUGASSERT(!is_idle_task(this_task()));
-
nxmutex_lock(&g_thermal_lock);
/* Update termerature */