sched/wdog: remove unnecessary list_node redefinition

The wdog implementation redefined `list_node`, which could cause
  conflicts or unexpected behavior when both `wdog/wdog.h` and
  `list.h` are included in the same source file. This patch removes
  the redundant definition to avoid such issues.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
wangchengdong
2025-10-05 12:12:32 +08:00
committed by archer
parent 4442cb7826
commit 08050f506c
2 changed files with 2 additions and 14 deletions
+2 -9
View File
@@ -31,6 +31,7 @@
#include <nuttx/compiler.h>
#include <nuttx/clock.h>
#include <nuttx/list.h>
#include <errno.h>
#include <stdint.h>
@@ -78,19 +79,11 @@ typedef uint32_t wdparm_t;
typedef CODE void (*wdentry_t)(wdparm_t arg);
/* Avoid the inclusion of nuttx/list.h */
struct wdlist_node
{
FAR struct wdlist_node *prev;
FAR struct wdlist_node *next;
};
/* Support a doubly linked list of watchdog timers */
struct wdog_s
{
struct wdlist_node node; /* Supports a doubly linked list */
struct list_node node; /* Supports a doubly linked list */
wdparm_t arg; /* Callback argument */
wdentry_t func; /* Function to execute when delay expires */
#ifdef CONFIG_PIC
-5
View File
@@ -36,17 +36,12 @@
#include <nuttx/clock.h>
#include <nuttx/queue.h>
#include <nuttx/wdog.h>
#include <nuttx/list.h>
#include <nuttx/spinlock_type.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Redefine to the standard list */
#define list_node wdlist_node
/****************************************************************************
* Public Data
****************************************************************************/