From: Alasdair G Kergon <[email-masked]>

Use boolean bit fields for flags in struct dm_target.

Signed-off-by: Alasdair G Kergon <[email-masked]>

---
 drivers/md/dm-crypt.c         |    2 +-
 drivers/md/dm-raid1.c         |    2 +-
 drivers/md/dm-thin.c          |    8 ++++----
 include/linux/device-mapper.h |    6 +++---
 4 files changed, 9 insertions(+), 9 deletions(-)

Index: linux-3.5/drivers/md/dm-crypt.c
===================================================================
--- linux-3.5.orig/drivers/md/dm-crypt.c
+++ linux-3.5/drivers/md/dm-crypt.c
@@ -1694,7 +1694,7 @@ static int crypt_ctr(struct dm_target *t
 	}
 
 	ti->num_flush_requests = 1;
-	ti->discard_zeroes_data_unsupported = 1;
+	ti->discard_zeroes_data_unsupported = true;
 
 	return 0;
 
Index: linux-3.5/drivers/md/dm-raid1.c
===================================================================
--- linux-3.5.orig/drivers/md/dm-raid1.c
+++ linux-3.5/drivers/md/dm-raid1.c
@@ -1088,7 +1088,7 @@ static int mirror_ctr(struct dm_target *
 
 	ti->num_flush_requests = 1;
 	ti->num_discard_requests = 1;
-	ti->discard_zeroes_data_unsupported = 1;
+	ti->discard_zeroes_data_unsupported = true;
 
 	ms->kmirrord_wq = alloc_workqueue("kmirrord",
 					  WQ_NON_REENTRANT | WQ_MEM_RECLAIM, 0);
Index: linux-3.5/drivers/md/dm-thin.c
===================================================================
--- linux-3.5.orig/drivers/md/dm-thin.c
+++ linux-3.5/drivers/md/dm-thin.c
@@ -2053,7 +2053,7 @@ static int pool_ctr(struct dm_target *ti
 		 * stacking of discard limits (this keeps the pool and
 		 * thin devices' discard limits consistent).
 		 */
-		ti->discards_supported = 1;
+		ti->discards_supported = true;
 	}
 	ti->private = pt;
 
@@ -2656,11 +2656,11 @@ static int thin_ctr(struct dm_target *ti
 
 	/* In case the pool supports discards, pass them on. */
 	if (tc->pool->pf.discard_enabled) {
-		ti->discards_supported = 1;
+		ti->discards_supported = true;
 		ti->num_discard_requests = 1;
-		ti->discard_zeroes_data_unsupported = 1;
+		ti->discard_zeroes_data_unsupported = true;
 		/* Discard requests must be split on a block boundary */
-		ti->split_discard_requests = 1;
+		ti->split_discard_requests = true;
 	}
 
 	dm_put(pool_md);
Index: linux-3.5/include/linux/device-mapper.h
===================================================================
--- linux-3.5.orig/include/linux/device-mapper.h
+++ linux-3.5/include/linux/device-mapper.h
@@ -221,18 +221,18 @@ struct dm_target {
 	 * Set if this target needs to receive discards regardless of
 	 * whether or not its underlying devices have support.
 	 */
-	unsigned discards_supported:1;
+	bool discards_supported:1;
 
 	/*
 	 * Set if the target required discard request to be split
 	 * on max_io_len boundary.
 	 */
-	unsigned split_discard_requests:1;
+	bool split_discard_requests:1;
 
 	/*
 	 * Set if this target does not return zeroes on discarded blocks.
 	 */
-	unsigned discard_zeroes_data_unsupported:1;
+	bool discard_zeroes_data_unsupported:1;
 };
 
 /* Each target can link one of these into the table */