mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] NFSD: Drop redundant conversion to bool
@ 2025-08-18 10:03 Xichao Zhao
  2025-08-18 11:43 ` Jeff Layton
  2025-08-18 14:01 ` Chuck Lever
  0 siblings, 2 replies; 3+ messages in thread
From: Xichao Zhao @ 2025-08-18 10:03 UTC (permalink / raw)
  To: chuck.lever, jlayton
  Cc: neil, okorniev, Dai.Ngo, tom, linux-nfs, linux-kernel, Xichao Zhao

The result of integer comparison already evaluates to bool. No need for
explicit conversion.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
 fs/nfsd/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfsd/debugfs.c b/fs/nfsd/debugfs.c
index 84b0c8b559dc..f07d790d56aa 100644
--- a/fs/nfsd/debugfs.c
+++ b/fs/nfsd/debugfs.c
@@ -26,7 +26,7 @@ static int nfsd_dsr_get(void *data, u64 *val)
 
 static int nfsd_dsr_set(void *data, u64 val)
 {
-	nfsd_disable_splice_read = (val > 0) ? true : false;
+	nfsd_disable_splice_read = (val > 0);
 	return 0;
 }
 
-- 
2.34.1


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

end of thread, other threads:[~2025-08-18 14:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-18 10:03 [PATCH] NFSD: Drop redundant conversion to bool Xichao Zhao
2025-08-18 11:43 ` Jeff Layton
2025-08-18 14:01 ` Chuck Lever

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®