From 08050f506c34ad99a1bd303840afc3f534733d5f Mon Sep 17 00:00:00 2001 From: wangchengdong Date: Sun, 5 Oct 2025 12:12:32 +0800 Subject: [PATCH] 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 --- include/nuttx/wdog.h | 11 ++--------- sched/wdog/wdog.h | 5 ----- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/include/nuttx/wdog.h b/include/nuttx/wdog.h index 016aacee4bf..19108f5c834 100644 --- a/include/nuttx/wdog.h +++ b/include/nuttx/wdog.h @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -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 diff --git a/sched/wdog/wdog.h b/sched/wdog/wdog.h index d5520c747cf..b2b76434002 100644 --- a/sched/wdog/wdog.h +++ b/sched/wdog/wdog.h @@ -36,17 +36,12 @@ #include #include #include -#include #include /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* Redefine to the standard list */ - -#define list_node wdlist_node - /**************************************************************************** * Public Data ****************************************************************************/