linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] ext4: use string choices helpers
@ 2024-10-07 17:20 R Sundar
  2024-11-07 15:12 ` Theodore Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: R Sundar @ 2024-10-07 17:20 UTC (permalink / raw)
  To: tytso, adilger.kernel
  Cc: linux-ext4, linux-kernel, riteshh, R Sundar, kernel test robot,
	Julia Lawall

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

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@inria.fr>
Closes: https://lore.kernel.org/r/202410062256.BoynX3c2-lkp@intel.com/
Signed-off-by: R Sundar <prosunofficial@gmail.com>
---

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

cocci warnings: (new ones prefixed by >>)
>> 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(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index d73e38323879..49dd27c2f2dc 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -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;
 }
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH linux-next] ext4: use string choices helpers
  2024-10-07 17:20 [PATCH linux-next] ext4: use string choices helpers R Sundar
@ 2024-11-07 15:12 ` Theodore Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2024-11-07 15:12 UTC (permalink / raw)
  To: adilger.kernel, R Sundar
  Cc: Theodore Ts'o, linux-ext4, linux-kernel, riteshh,
	kernel test robot, Julia Lawall


On Mon, 07 Oct 2024 22:50:06 +0530, R Sundar wrote:
> 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,
-- 
Theodore Ts'o <tytso@mit.edu>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-07 15:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07 17:20 [PATCH linux-next] ext4: use string choices helpers R Sundar
2024-11-07 15:12 ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).