[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1648436049-4335-1-git-send-email-baihaowen@meizu.com>
Date: Mon, 28 Mar 2022 10:54:09 +0800
From: Haowen Bai <baihaowen@...zu.com>
To: <philipp.reisner@...bit.com>, <lars.ellenberg@...bit.com>,
<axboe@...nel.dk>
CC: <drbd-dev@...ts.linbit.com>, <linux-block@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, Haowen Bai <baihaowen@...zu.com>
Subject: [PATCH] drbd: Return true/false (not 1/0) from bool functions
Return boolean values ("true" or "false") instead of 1 or 0 from bool
functions. This fixes the following warnings from coccicheck:
./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
Signed-off-by: Haowen Bai <baihaowen@...zu.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 c043945..171905a 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.7.4
Powered by blists - more mailing lists