mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fabian Frederick <fabf@skynet.be>
To: linux-kernel@vger.kernel.org
Cc: Philipp Reisner <philipp.reisner@linbit.com>,
	Fabian Frederick <fabf@skynet.be>,
	Lars Ellenberg <lars.ellenberg@linbit.com>,
	drbd-dev@lists.linbit.com
Subject: [PATCH 12/21] drbd: use true/false for bool
Date: Fri, 27 Nov 2015 22:29:27 +0100	[thread overview]
Message-ID: <1448659775-13596-3-git-send-email-fabf@skynet.be> (raw)
In-Reply-To: <1448659775-13596-1-git-send-email-fabf@skynet.be>

Fix 4 coccinelle warnings

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 drivers/block/drbd/drbd_receiver.c | 4 ++--
 drivers/block/drbd/drbd_worker.c   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index d4c807c..ad9b99b 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -2065,13 +2065,13 @@ static inline int overlaps(sector_t s1, int l1, sector_t s2, int l2)
 static bool overlapping_resync_write(struct drbd_device *device, struct drbd_peer_request *peer_req)
 {
 	struct drbd_peer_request *rs_req;
-	bool rv = 0;
+	bool rv = false;
 
 	spin_lock_irq(&device->resource->req_lock);
 	list_for_each_entry(rs_req, &device->sync_ee, w.list) {
 		if (overlaps(peer_req->i.sector, peer_req->i.size,
 			     rs_req->i.sector, rs_req->i.size)) {
-			rv = 1;
+			rv = true;
 			break;
 		}
 	}
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index e427ba0..17874bc 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
@@ -1627,7 +1627,7 @@ static bool use_checksum_based_resync(struct drbd_connection *connection, struct
 	rcu_read_unlock();
 	return connection->agreed_pro_version >= 89 &&		/* supported? */
 		connection->csums_tfm &&			/* configured? */
-		(csums_after_crash_only == 0			/* use for each resync? */
+		(csums_after_crash_only == false		/* use for each resync? */
 		 || test_bit(CRASHED_PRIMARY, &device->flags));	/* or only after Primary crash? */
 }
 
@@ -1762,7 +1762,7 @@ void drbd_start_resync(struct drbd_device *device, enum drbd_conns side)
 			device->bm_resync_fo = 0;
 			device->use_csums = use_checksum_based_resync(connection, device);
 		} else {
-			device->use_csums = 0;
+			device->use_csums = false;
 		}
 
 		/* Since protocol 96, we must serialize drbd_gen_and_send_sync_uuid
-- 
2.1.4


  parent reply	other threads:[~2015-11-27 21:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27 21:26 [PATCH 00/21] drbd: clean-up patchset Fabian Frederick
2015-11-27 21:26 ` [PATCH 01/21] drbd: debugfs: constify drbd_version_fops Fabian Frederick
2015-11-27 21:26 ` [PATCH 02/21] drbd: simplify drbd_md_set_sector_offsets() Fabian Frederick
2015-11-27 21:26 ` [PATCH 03/21] drbd: use seq_put instead of seq_print where possible Fabian Frederick
2015-11-27 21:26 ` [PATCH 04/21] drbd: include linux/uaccess.h instead of asm/uaccess.h Fabian Frederick
2015-11-27 21:26 ` [PATCH 05/21] drbd: rework is_valid_state() Fabian Frederick
2015-11-27 21:26 ` [PATCH 06/21] drbd: use const char * const for drbd strings Fabian Frederick
2015-11-27 21:26 ` [PATCH 07/21] drbd: kerneldoc warning fix in w_e_end_data_req() Fabian Frederick
2015-11-27 21:26 ` [PATCH 08/21] drbd: use unsigned for one bit fields Fabian Frederick
2015-11-27 21:26 ` [PATCH 09/21] drbd: use bool for peer is_ states Fabian Frederick
2015-11-27 21:29 ` [PATCH 10/21] drbd: fix typo Fabian Frederick
2015-11-27 21:29   ` [PATCH 11/21] drbd: use | for bitmask combination Fabian Frederick
2015-11-27 21:29   ` Fabian Frederick [this message]
2015-11-27 21:29   ` [PATCH 13/21] drbd: fix drbd_bm_init() comments Fabian Frederick
2015-11-27 21:29   ` [PATCH 14/21] drbd: clean-up receive_SyncParam() Fabian Frederick
2015-11-27 21:29   ` [PATCH 15/21] drbd: introduce peer state union Fabian Frederick
2015-11-27 21:29   ` [PATCH 16/21] drbd: fix maybe_pull_ahead() locking comments Fabian Frederick
2015-11-27 21:29   ` [PATCH 17/21] drbd: use bool for growing Fabian Frederick
2015-11-27 21:29   ` [PATCH 18/21] drbd: remove redundant declarations Fabian Frederick
2015-11-27 21:29   ` [PATCH 19/21] drbd: remove bm_vk_free() Fabian Frederick
2015-11-27 21:30 ` [PATCH 20/21] drbd: remove unused definitions Fabian Frederick
2015-11-27 21:30   ` [PATCH 21/21] drbd: replace if/BUG by BUG_ON Fabian Frederick
2015-12-01  8:55 ` [Drbd-dev] [PATCH 00/21] drbd: clean-up patchset Philipp Reisner

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=1448659775-13596-3-git-send-email-fabf@skynet.be \
    --to=fabf@skynet.be \
    --cc=drbd-dev@lists.linbit.com \
    --cc=lars.ellenberg@linbit.com \
    --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 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®