linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] proc: fix comparison to bool warning
@ 2020-11-07 15:30 xiakaixu1987
  0 siblings, 0 replies; only message in thread
From: xiakaixu1987 @ 2020-11-07 15:30 UTC (permalink / raw)
  To: adobriyan; +Cc: linux-fsdevel, linux-kernel, Kaixu Xia

From: Kaixu Xia <kaixuxia@tencent.com>

Fix the following coccicheck warning:

./fs/proc/generic.c:370:5-31: WARNING: Comparison to bool

Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
 fs/proc/generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 2f9fa179194d..4533eb826af7 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -367,7 +367,7 @@ struct proc_dir_entry *proc_register(struct proc_dir_entry *dir,
 
 	write_lock(&proc_subdir_lock);
 	dp->parent = dir;
-	if (pde_subdir_insert(dir, dp) == false) {
+	if (!pde_subdir_insert(dir, dp)) {
 		WARN(1, "proc_dir_entry '%s/%s' already registered\n",
 		     dir->name, dp->name);
 		write_unlock(&proc_subdir_lock);
-- 
2.20.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-07 15:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-07 15:30 [PATCH] proc: fix comparison to bool warning xiakaixu1987

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).