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
commit 0c69405fd10d9d2d7cfe3c333944515dd2c58d87 Author: zhaoxingyu1 <[email protected]> AuthorDate: Thu Nov 12 17:54:08 2026 +0800 fs: fix nxstyle errors reported by checkpatch checkpatch.sh lints whole files rather than only the changed ranges, so these pre-existing violations fail CI on any patch that touches these files. Add the missing blank lines after declarations and fix the case body indentation in spiffs_seek(). No functional change. Signed-off-by: zhaoxingyu1 <[email protected]> --- fs/nxffs/nxffs_dump.c | 1 + fs/partition/fs_mbr.c | 1 + fs/spiffs/src/spiffs_vfs.c | 18 ++++++++++-------- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/fs/nxffs/nxffs_dump.c b/fs/nxffs/nxffs_dump.c index 45f8b330fa7..a4c1f0e329f 100644 --- a/fs/nxffs/nxffs_dump.c +++ b/fs/nxffs/nxffs_dump.c @@ -314,6 +314,7 @@ static inline void nxffs_analyze(FAR struct nxffs_blkinfo_s *blkinfo) size_t datsize = blkinfo->geo.blocksize - SIZEOF_NXFFS_BLOCK_HDR; size_t nerased = nxffs_erased(blkinfo->buffer + SIZEOF_NXFFS_BLOCK_HDR, datsize); + if (nerased == datsize) { if (blkinfo->verbose) diff --git a/fs/partition/fs_mbr.c b/fs/partition/fs_mbr.c index 5fae67a04bb..47de1083943 100644 --- a/fs/partition/fs_mbr.c +++ b/fs/partition/fs_mbr.c @@ -161,6 +161,7 @@ int parse_mbr_partition(FAR struct partition_state_s *state, if (extended) { uint32_t ebr_block; + ebr_block = MBR_LBA_TO_BLOCK(extended->partition_start, state->blocksize); while (1) diff --git a/fs/spiffs/src/spiffs_vfs.c b/fs/spiffs/src/spiffs_vfs.c index d9cf6e2dff6..2c3c3df3698 100644 --- a/fs/spiffs/src/spiffs_vfs.c +++ b/fs/spiffs/src/spiffs_vfs.c @@ -653,6 +653,7 @@ static ssize_t spiffs_write(FAR struct file *filep, FAR const char *buffer, /* Small write, try to cache it */ bool alloc_cpage = true; + if (fobj->cache_page != NULL) { /* We have a cached page for this object already, check cache @@ -861,22 +862,22 @@ static off_t spiffs_seek(FAR struct file *filep, off_t offset, int whence) switch (whence) { case SEEK_SET: /* The offset is set to offset bytes. */ - pos = offset; - break; + pos = offset; + break; case SEEK_CUR: /* The offset is set to its current location plus * offset bytes. */ - pos = offset + filep->f_pos; - break; + pos = offset + filep->f_pos; + break; case SEEK_END: /* The offset is set to the size of the file plus * offset bytes. */ - pos = fsize + offset; - break; + pos = fsize + offset; + break; default: - ret = -EINVAL; - goto errout_with_lock; + ret = -EINVAL; + goto errout_with_lock; } /* Verify the resulting file position */ @@ -990,6 +991,7 @@ static int spiffs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) /* No.. we will have to erase a block at a time */ int16_t blkndx = 0; + while (blkndx < SPIFFS_GEO_BLOCK_COUNT(fs)) { fs->max_erase_count = 0;
