All of lore.kernel.org
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH -next] f2fs: Simplify bool conversion
@ 2021-12-15  2:38 ` Yang Li
  0 siblings, 0 replies; 10+ messages in thread
From: Yang Li @ 2021-12-15  2:38 UTC (permalink / raw)
  To: jaegeuk; +Cc: Abaci Robot, Yang Li, linux-kernel, linux-f2fs-devel

Fix the following coccicheck warning:
./fs/f2fs/sysfs.c:491:41-46: WARNING: conversion to bool not needed here

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 fs/f2fs/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 9e1cf44642ae..530c36b89bf1 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -488,7 +488,7 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
 
 	if (!strcmp(a->attr.name, "gc_urgent_high_remaining")) {
 		spin_lock(&sbi->gc_urgent_high_lock);
-		sbi->gc_urgent_high_limited = t == 0 ? false : true;
+		sbi->gc_urgent_high_limited = t != 0;
 		sbi->gc_urgent_high_remaining = t;
 		spin_unlock(&sbi->gc_urgent_high_lock);
 
-- 
2.20.1.7.g153144c



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

end of thread, other threads:[~2021-12-17 16:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-15  2:38 [f2fs-dev] [PATCH -next] f2fs: Simplify bool conversion Yang Li
2021-12-15  2:38 ` Yang Li
2021-12-16 19:27 ` [f2fs-dev] " Jaegeuk Kim
2021-12-16 19:27   ` Jaegeuk Kim
     [not found]   ` <fc89c7e6-ced2-40e1-9d01-496a3b60b268.yang.lee@linux.alibaba.com>
2021-12-17 16:51     ` [f2fs-dev] 回复:[PATCH " Jaegeuk Kim
2021-12-17 16:51       ` Jaegeuk Kim
2021-12-17  1:12 ` [f2fs-dev] [PATCH " Chao Yu
2021-12-17  1:12   ` Chao Yu
2021-12-17 16:54   ` [f2fs-dev] " Jaegeuk Kim
2021-12-17 16:54     ` Jaegeuk Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.