This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 4f499711c61ddc8f21a0dfb1417636cb8712bfb2
Author: Xiang Xiao <[email protected]>
AuthorDate: Thu Nov 12 00:33:37 2026 +0800

    fs/procfs: drop redundant uint8_t casts in the proc node table
    
    The node field of struct proc_node_s is already uint8_t, so the
    explicit casts on the initializers do nothing.
    
    Signed-off-by: Xiang Xiao <[email protected]>
    Signed-off-by: jingfei <[email protected]>
---
 fs/procfs/fs_procfsproc.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c
index 44e51e23a94..2ca63c938c5 100644
--- a/fs/procfs/fs_procfsproc.c
+++ b/fs/procfs/fs_procfsproc.c
@@ -279,71 +279,71 @@ const struct procfs_operations g_proc_operations =
 
 static const struct proc_node_s g_level0node =
 {
-  "",             "",        (uint8_t)PROC_LEVEL0,       DTYPE_DIRECTORY   /* 
Top-level directory */
+  "",             "",        PROC_LEVEL0,       DTYPE_DIRECTORY   /* Top-level 
directory */
 };
 
 static const struct proc_node_s g_status =
 {
-  "status",       "status",  (uint8_t)PROC_STATUS,       DTYPE_FILE        /* 
Task/thread status */
+  "status",       "status",  PROC_STATUS,       DTYPE_FILE        /* 
Task/thread status */
 };
 
 static const struct proc_node_s g_cmdline =
 {
-  "cmdline",      "cmdline", (uint8_t)PROC_CMDLINE,      DTYPE_FILE        /* 
Task command line */
+  "cmdline",      "cmdline", PROC_CMDLINE,      DTYPE_FILE        /* Task 
command line */
 };
 
 #ifndef CONFIG_SCHED_CPULOAD_NONE
 static const struct proc_node_s g_loadavg =
 {
-  "loadavg",       "loadavg", (uint8_t)PROC_LOADAVG,     DTYPE_FILE        /* 
Average CPU utilization */
+  "loadavg",       "loadavg", PROC_LOADAVG,     DTYPE_FILE        /* Average 
CPU utilization */
 };
 #endif
 
 #ifdef CONFIG_SCHED_CRITMONITOR
 static const struct proc_node_s g_critmon =
 {
-  "critmon",       "critmon", (uint8_t)PROC_CRITMON,     DTYPE_FILE        /* 
Critical Section Monitor */
+  "critmon",       "critmon", PROC_CRITMON,     DTYPE_FILE        /* Critical 
Section Monitor */
 };
 #endif
 
 #if CONFIG_MM_BACKTRACE >= 0
 static const struct proc_node_s g_heap =
 {
-  "heap",         "heap",   (uint8_t)PROC_HEAP,          DTYPE_FILE        /* 
Task heap info */
+  "heap",         "heap",   PROC_HEAP,          DTYPE_FILE        /* Task heap 
info */
 };
 #endif
 
 #ifdef CONFIG_DEBUG_MM
 static const struct proc_node_s g_heapcheck =
 {
-  "heapcheck",    "heapcheck", (uint8_t)PROC_HEAP_CHECK, DTYPE_FILE        /* 
Task heap info */
+  "heapcheck",    "heapcheck", PROC_HEAP_CHECK, DTYPE_FILE        /* Task heap 
info */
 };
 #endif
 
 static const struct proc_node_s g_stack =
 {
-  "stack",        "stack",   (uint8_t)PROC_STACK,        DTYPE_FILE        /* 
Task stack info */
+  "stack",        "stack",   PROC_STACK,        DTYPE_FILE        /* Task 
stack info */
 };
 
 static const struct proc_node_s g_group =
 {
-  "group",        "group",   (uint8_t)PROC_GROUP,        DTYPE_DIRECTORY   /* 
Group directory */
+  "group",        "group",   PROC_GROUP,        DTYPE_DIRECTORY   /* Group 
directory */
 };
 
 static const struct proc_node_s g_groupstatus =
 {
-  "group/status", "status",  (uint8_t)PROC_GROUP_STATUS, DTYPE_FILE        /* 
Task group status */
+  "group/status", "status",  PROC_GROUP_STATUS, DTYPE_FILE        /* Task 
group status */
 };
 
 static const struct proc_node_s g_groupfd =
 {
-  "group/fd",     "fd",      (uint8_t)PROC_GROUP_FD,     DTYPE_FILE        /* 
Group file descriptors */
+  "group/fd",     "fd",      PROC_GROUP_FD,     DTYPE_FILE        /* Group 
file descriptors */
 };
 
 #if !defined(CONFIG_DISABLE_ENVIRON) && 
!defined(CONFIG_FS_PROCFS_EXCLUDE_ENVIRON)
 static const struct proc_node_s g_groupenv =
 {
-  "group/env",    "env",     (uint8_t)PROC_GROUP_ENV,    DTYPE_FILE        /* 
Group environment variables */
+  "group/env",    "env",     PROC_GROUP_ENV,    DTYPE_FILE        /* Group 
environment variables */
 };
 
 #endif

Reply via email to