linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] drivers: Use bool function return values true/false not 1/0
@ 2015-03-30 17:43 Joe Perches
  2015-03-30 17:43 ` [PATCH 2/7] dm_table: Use bool function return values of " Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2015-03-30 17:43 UTC (permalink / raw)
  To: linux-kernel, dm-devel, linux-raid, platform-driver-x86, netdev,
	linux-pm, linux-serial
  Cc: dri-devel

Joe Perches (7):
  drm: Use bool function return values of true/false not 1/0
  dm_table: Use bool function return values of true/false not 1/0
  genwqe: Use bool function return values of true/false not 1/0
  wmi: Use bool function return values of true/false not 1/0
  ssb: Use bool function return values of true/false not 1/0
  thermal: Use bool function return values of true/false not 1/0
  serial: kgdb_nmi: Use bool function return values of true/false not
    1/0

 drivers/gpu/drm/ast/ast_post.c        |  2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c |  2 +-
 drivers/md/dm-table.c                 | 20 ++++++++++----------
 drivers/misc/genwqe/card_base.h       |  2 +-
 drivers/platform/x86/wmi.c            |  4 ++--
 drivers/ssb/driver_gige.c             |  2 +-
 drivers/thermal/thermal_core.h        |  2 +-
 drivers/tty/serial/kgdb_nmi.c         |  6 +++---
 8 files changed, 20 insertions(+), 20 deletions(-)

-- 
2.1.2

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/7] dm_table: Use bool function return values of true/false not 1/0
  2015-03-30 17:43 [PATCH 0/7] drivers: Use bool function return values true/false not 1/0 Joe Perches
@ 2015-03-30 17:43 ` Joe Perches
  2015-03-30 17:51   ` Mike Snitzer
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2015-03-30 17:43 UTC (permalink / raw)
  To: linux-kernel, Alasdair Kergon, Mike Snitzer, dm-devel, Neil Brown
  Cc: linux-raid

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/md/dm-table.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index e0f618b..d9b00b8 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1336,14 +1336,14 @@ static bool dm_table_supports_flush(struct dm_table *t, unsigned flush)
 			continue;
 
 		if (ti->flush_supported)
-			return 1;
+			return true;
 
 		if (ti->type->iterate_devices &&
 		    ti->type->iterate_devices(ti, device_flush_capable, &flush))
-			return 1;
+			return true;
 	}
 
-	return 0;
+	return false;
 }
 
 static bool dm_table_discard_zeroes_data(struct dm_table *t)
@@ -1356,10 +1356,10 @@ static bool dm_table_discard_zeroes_data(struct dm_table *t)
 		ti = dm_table_get_target(t, i++);
 
 		if (ti->discard_zeroes_data_unsupported)
-			return 0;
+			return false;
 	}
 
-	return 1;
+	return true;
 }
 
 static int device_is_nonrot(struct dm_target *ti, struct dm_dev *dev,
@@ -1405,10 +1405,10 @@ static bool dm_table_all_devices_attribute(struct dm_table *t,
 
 		if (!ti->type->iterate_devices ||
 		    !ti->type->iterate_devices(ti, func, NULL))
-			return 0;
+			return false;
 	}
 
-	return 1;
+	return true;
 }
 
 static int device_not_write_same_capable(struct dm_target *ti, struct dm_dev *dev,
@@ -1465,14 +1465,14 @@ static bool dm_table_supports_discards(struct dm_table *t)
 			continue;
 
 		if (ti->discards_supported)
-			return 1;
+			return true;
 
 		if (ti->type->iterate_devices &&
 		    ti->type->iterate_devices(ti, device_discard_capable, NULL))
-			return 1;
+			return true;
 	}
 
-	return 0;
+	return false;
 }
 
 void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/7] dm_table: Use bool function return values of true/false not 1/0
  2015-03-30 17:43 ` [PATCH 2/7] dm_table: Use bool function return values of " Joe Perches
@ 2015-03-30 17:51   ` Mike Snitzer
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Snitzer @ 2015-03-30 17:51 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, Alasdair Kergon, dm-devel, Neil Brown, linux-raid

On Mon, Mar 30 2015 at  1:43pm -0400,
Joe Perches <joe@perches.com> wrote:

> Use the normal return values for bool functions
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-30 17:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-30 17:43 [PATCH 0/7] drivers: Use bool function return values true/false not 1/0 Joe Perches
2015-03-30 17:43 ` [PATCH 2/7] dm_table: Use bool function return values of " Joe Perches
2015-03-30 17:51   ` Mike Snitzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).