Skip to contentSkip to conversation

exfat: remove unnecessary else after return statement

PATCH Applied William Hansen-Baird 2 participants 4 messages Jan 22

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index f9501c3a3666..234a9f41e083 100644
@@ -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
#1 lore raw

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
index c9c5f2e3a05e..543ce7e8d367 100644
@@ -192,6 +192,7 @@ static int __exfat_free_cluster(struct inode *inode, struct exfat_chain *p_chain
 	if (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
index 536c8078f0c1..c7cfa28a3e11 100644
@@ -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
maintainer Applied
#2 lore raw

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.c and file.c. This improves readability and makes code style more consistent across the exfat subsystem.

Applied it to #dev.
Thanks!