* [PATCH -next] mm/fs: fix boolreturn.cocci warning
@ 2022-02-03 3:30 Yang Li
0 siblings, 0 replies; only message in thread
From: Yang Li @ 2022-02-03 3:30 UTC (permalink / raw)
To: axboe
Cc: philipp.reisner, lars.ellenberg, drbd-dev, linux-block,
linux-kernel, Yang Li, Abaci Robot
Return statement in function returning bool should use true/false
instead of 1/0.
Eliminate the following coccicheck warning:
./drivers/block/drbd/drbd_req.c:912:9-10: WARNING: return of 0/1 in
function 'remote_due_to_read_balancing' with return type bool
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/block/drbd/drbd_req.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index 2e5fb7e442e3..c8448379bbcd 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -909,7 +909,7 @@ static bool remote_due_to_read_balancing(struct drbd_device *device, sector_t se
switch (rbm) {
case RB_CONGESTED_REMOTE:
- return 0;
+ return false;
case RB_LEAST_PENDING:
return atomic_read(&device->local_cnt) >
atomic_read(&device->ap_pending_cnt) + atomic_read(&device->rs_pending_cnt);
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-02-03 3:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-03 3:30 [PATCH -next] mm/fs: fix boolreturn.cocci warning Yang Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox