exfat: remove unnecessary else after return statement
Subsystems (2)
PATCH 1/2 exfat: remove unnecessary else after return statement
Else-branch is unnecessary after return statement in if-branch. Remove to enhance readability and reduce indentation.
--- fs/exfat/inode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
fs/exfat/inode.c +3 -2
@@ -511,8 +511,9 @@ static ssize_t exfat_direct_IO(struct kiocb *iocb, struct iov_iter *iter)exfat_write_failed (mapping, size);return ret; - }else - size = pos + ret; + } + + size = pos + ret;if (rw ==WRITE ) {/*
Signature · 1 line
2.52.0
PATCH 2/2 exfat: add blank line after declarations
Add a blank line after variable declarations in fatent.c and file.c. This improves readability and makes code style more consistent across the exfat subsystem.
--- fs/exfat/fatent.c | 1 + fs/exfat/file.c | 1 + 2 files changed, 2 insertions(+)
fs/exfat/fatent.c +1 -0
@@ -192,6 +192,7 @@ static int __exfat_free_cluster(struct inode *inode, struct exfat_chain *p_chainif (p_chain->flags ==ALLOC_NO_FAT_CHAIN ) {int err;unsigned int last_cluster = p_chain->dir + p_chain->size -1 ; + do { bool sync = false;
fs/exfat/file.c +1 -0
@@ -682,6 +682,7 @@ static ssize_t exfat_file_write_iter(struct kiocb *iocb, struct iov_iter *iter)if (iocb->ki_pos > pos) {ssize_t err =generic_write_sync (iocb, iocb->ki_pos - pos); +if (err <0 )return err; }
Signature · 1 line
2.52.0
Re: [PATCH 2/2] exfat: add blank line after declarations
Quoted 6 lines · William Hansen-Baird
Add a blank line after variable declarations in
fatent.candfile.c. This improves readability and makes code style more consistent across the exfat subsystem.Signed-off-by William Hansen-Baird <[email protected]>
Applied it to #dev.
Thanks!
Quoted 5 lines · William Hansen-Baird
Else-branch is unnecessary after return statement in if-branch. Remove to enhance readability and reduce indentation.
Signed-off-by William Hansen-Baird <[email protected]>
Applied it to #dev.
Thanks!