All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christoph Böhmwalder" <christoph.boehmwalder@linbit.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org,
	"Lars Ellenberg" <lars.ellenberg@linbit.com>,
	"Philipp Reisner" <philipp.reisner@linbit.com>,
	linux-block@vger.kernel.org, "Haowen Bai" <baihaowen@meizu.com>,
	"Christoph Böhmwalder" <christoph.boehmwalder@linbit.com>
Subject: [PATCH 7/7] drbd: Return true/false (not 1/0) from bool functions
Date: Wed,  6 Apr 2022 21:07:15 +0200	[thread overview]
Message-ID: <20220406190715.1938174-8-christoph.boehmwalder@linbit.com> (raw)
In-Reply-To: <20220406190715.1938174-1-christoph.boehmwalder@linbit.com>

From: Haowen Bai <baihaowen@meizu.com>

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@meizu.com>
Reviewed-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.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 75be0e16770a..e64bcfba30ef 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -922,7 +922,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.35.1


  parent reply	other threads:[~2022-04-06 20:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 19:07 [PATCH 0/7] DRBD updates for 5.19 Christoph Böhmwalder
2022-04-06 19:07 ` [PATCH 1/7] drbd: fix duplicate array initializer Christoph Böhmwalder
2022-04-06 19:07 ` [PATCH 2/7] drbd: address enum mismatch warnings Christoph Böhmwalder
2022-04-06 19:07 ` [PATCH 3/7] block: drbd: drbd_receiver: Remove redundant assignment to err Christoph Böhmwalder
2022-04-06 19:07 ` [PATCH 4/7] drbd: Make use of PFN_UP helper macro Christoph Böhmwalder
2022-04-06 19:07 ` [PATCH 5/7] drbd: Replace "unsigned" with "unsigned int" Christoph Böhmwalder
2022-04-06 19:07 ` [PATCH 6/7] drdb: Switch to kvfree_rcu() API Christoph Böhmwalder
2022-04-06 19:07 ` Christoph Böhmwalder [this message]
2022-04-06 22:37 ` [PATCH 0/7] DRBD updates for 5.19 Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220406190715.1938174-8-christoph.boehmwalder@linbit.com \
    --to=christoph.boehmwalder@linbit.com \
    --cc=axboe@kernel.dk \
    --cc=baihaowen@meizu.com \
    --cc=drbd-dev@lists.linbit.com \
    --cc=lars.ellenberg@linbit.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philipp.reisner@linbit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.