Skip to contentSkip to conversation

ext4: use string choices helpers

PATCH Applied R Sundar 2 participants 2 messages Oct 7, 2024 – Nov 7, 2024 ext4 file system

lore
Share & tools
lore

R Sundar

author
#0 lore raw

PATCH 1/1 ext4: use string choices helpers

Use string choice helpers for better readability and to fix cocci warning

---

Reported in linux repo:
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

cocci warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

fs/ext4/mballoc.c:4597:47-50: opportunity for str_yes_no(ret)

vim +4597 fs/ext4/mballoc.c

compile tested only.

 fs/ext4/mballoc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/mballoc.c +1 -1
index d73e38323879..49dd27c2f2dc 100644
@@ -6056,7 +6056,7 @@ static bool ext4_mb_discard_preallocations_should_retry(struct super_block *sb,
 	}
 
 out_dbg:
-	mb_debug(sb, "freed %d, retry ? %s\n", freed, ret ? "yes" : "no");
+	mb_debug(sb, "freed %d, retry ? %s\n", freed, str_yes_no(ret));
 	return ret;
 }
 
Signature · 1 line
2.34.1
maintainer Applied
#1 lore raw
Quoted 3 lines · R Sundar

Use string choice helpers for better readability and to fix cocci warning

Applied, thanks!

[1/1] ext4: use string choices helpers

      commit: e4765b185abd8fa49709598559cedb2c0822955e

Best regards,

Signature · 1 line
Theodore Ts'o <[email protected]>