mm/fs: fix boolreturn.cocci warning
Subsystems (2)
PATCH 1/1 mm/fs: fix boolreturn.cocci warning
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 <[email protected]>
Signed-off-by Yang Li <[email protected]>
--- drivers/block/drbd/drbd_req.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/drbd/drbd_req.c +1 -1
@@ -909,7 +909,7 @@ static bool remote_due_to_read_balancing(struct drbd_device *device, sector_t seswitch (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);
Signature · 1 line
2.20.1.7.g153144c