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

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


The following commit(s) were added to refs/heads/master by this push:
     new 8fdfd354dbd fs/inode: inline fdlist_count
8fdfd354dbd is described below

commit 8fdfd354dbdba9bc17562ed6109a044faa29b872
Author: zhangyu117 <[email protected]>
AuthorDate: Thu Nov 26 22:33:19 2026 +0800

    fs/inode: inline fdlist_count
    
    Keep the descriptor-table capacity helper in fs.h so callers can
    compute the row capacity without an out-of-line call.
    
    Signed-off-by: zhangyu117 <[email protected]>
    Signed-off-by: jingfei <[email protected]>
---
 fs/inode/fs_files.c   | 19 -------------------
 include/nuttx/fs/fs.h |  5 ++++-
 2 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/fs/inode/fs_files.c b/fs/inode/fs_files.c
index 8723dbba178..02a47e47d71 100644
--- a/fs/inode/fs_files.c
+++ b/fs/inode/fs_files.c
@@ -588,25 +588,6 @@ void fdlist_free(FAR struct fdlist *list)
     }
 }
 
-/****************************************************************************
- * Name: fdlist_count
- *
- * Description:
- *   Get file descriptor count from file list.
- *
- * Input Parameters:
- *   list - Pointer to the file descriptor list structure.
- *
- * Returned Value:
- *   file count of file list.
- *
- ****************************************************************************/
-
-int fdlist_count(FAR struct fdlist *list)
-{
-  return list->fl_rows * CONFIG_NFILE_DESCRIPTORS_PER_BLOCK;
-}
-
 /****************************************************************************
  * Name: fdlist_get2
  *
diff --git a/include/nuttx/fs/fs.h b/include/nuttx/fs/fs.h
index f038d845e5c..a5945294b82 100644
--- a/include/nuttx/fs/fs.h
+++ b/include/nuttx/fs/fs.h
@@ -1047,7 +1047,10 @@ void fdlist_free(FAR struct fdlist *list);
  *
  ****************************************************************************/
 
-int fdlist_count(FAR struct fdlist *list);
+static inline int fdlist_count(FAR struct fdlist *list)
+{
+  return list->fl_rows * CONFIG_NFILE_DESCRIPTORS_PER_BLOCK;
+}
 
 /****************************************************************************
  * Name: fdlist_copy

Reply via email to