From 72e0b292f84063ab4a299e0da172225ce6014e40 Mon Sep 17 00:00:00 2001 From: yukangzhi Date: Fri, 28 Aug 2026 15:18:07 +0800 Subject: [PATCH] fs: fix pre-existing nxstyle issues in touched files Fix coding style violations detected by CI whole-file nxstyle scan: - fs/smartfs/smartfs_utils.c: add missing braces after if (L334), fix bad alignment (L414), fix switch brace alignment (L1531) - fs/hostfs/hostfs.c: add blank line after declaration (L576) These are pre-existing style issues in master, not introduced by this PR, but reported because CI checks the entire touched file. Signed-off-by: yukangzhi --- fs/smartfs/smartfs_utils.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/fs/smartfs/smartfs_utils.c b/fs/smartfs/smartfs_utils.c index 5ed4d14dd49..f81e980acf8 100644 --- a/fs/smartfs/smartfs_utils.c +++ b/fs/smartfs/smartfs_utils.c @@ -331,7 +331,9 @@ int smartfs_unmount(FAR struct smartfs_mountpt_s *fs) /* Test if this FS's blkdriver matches ours (it could be us) */ if (nextfs->fs_blkdriver == fs->fs_blkdriver) - count++; + { + count++; + } /* Test if this entry is our's */ @@ -411,7 +413,7 @@ int smartfs_unmount(FAR struct smartfs_mountpt_s *fs) #else if (fs->fs_blkdriver) { - inode = fs->fs_blkdriver; + inode = fs->fs_blkdriver; if (inode) { if (inode->u.i_bops && inode->u.i_bops->close) @@ -1528,20 +1530,20 @@ off_t smartfs_seek_internal(FAR struct smartfs_mountpt_s *fs, /* Calculate the file position to seek to based on current position */ switch (whence) - { - case SEEK_SET: - default: - newpos = offset; - break; + { + case SEEK_SET: + default: + newpos = offset; + break; - case SEEK_CUR: - newpos = sf->filepos + offset; - break; + case SEEK_CUR: + newpos = sf->filepos + offset; + break; - case SEEK_END: - newpos = sf->entry.datlen + offset; - break; - } + case SEEK_END: + newpos = sf->entry.datlen + offset; + break; + } /* Ensure newpos is in range */