diff options
author | Joe Perches <joe@perches.com> | 2015-03-30 13:43:18 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2015-04-15 12:10:23 -0400 |
commit | 7f61f5a022101e0c38c3cff2ef9ace9c9c86dbfb (patch) | |
tree | 1e5022607343a7fed4abe7460e2a2912b34023b9 | |
parent | 65ff5b7ddf0541f2b6e5cc59c47bfbf6cbcd91b8 (diff) |
dm table: use bool function return values of true/false not 1/0
Use the normal return values for bool functions.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
-rw-r--r-- | drivers/md/dm-table.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index e0f618b43c25..d9b00b8565c6 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) | |||
1336 | continue; | 1336 | continue; |
1337 | 1337 | ||
1338 | if (ti->flush_supported) | 1338 | if (ti->flush_supported) |
1339 | return 1; | 1339 | return true; |
1340 | 1340 | ||
1341 | if (ti->type->iterate_devices && | 1341 | if (ti->type->iterate_devices && |
1342 | ti->type->iterate_devices(ti, device_flush_capable, &flush)) | 1342 | ti->type->iterate_devices(ti, device_flush_capable, &flush)) |
1343 | return 1; | 1343 | return true; |
1344 | } | 1344 | } |
1345 | 1345 | ||
1346 | return 0; | 1346 | return false; |
1347 | } | 1347 | } |
1348 | 1348 | ||
1349 | static bool dm_table_discard_zeroes_data(struct dm_table *t) | 1349 | 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) | |||
1356 | ti = dm_table_get_target(t, i++); | 1356 | ti = dm_table_get_target(t, i++); |
1357 | 1357 | ||
1358 | if (ti->discard_zeroes_data_unsupported) | 1358 | if (ti->discard_zeroes_data_unsupported) |
1359 | return 0; | 1359 | return false; |
1360 | } | 1360 | } |
1361 | 1361 | ||
1362 | return 1; | 1362 | return true; |
1363 | } | 1363 | } |
1364 | 1364 | ||
1365 | static int device_is_nonrot(struct dm_target *ti, struct dm_dev *dev, | 1365 | 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, | |||
1405 | 1405 | ||
1406 | if (!ti->type->iterate_devices || | 1406 | if (!ti->type->iterate_devices || |
1407 | !ti->type->iterate_devices(ti, func, NULL)) | 1407 | !ti->type->iterate_devices(ti, func, NULL)) |
1408 | return 0; | 1408 | return false; |
1409 | } | 1409 | } |
1410 | 1410 | ||
1411 | return 1; | 1411 | return true; |
1412 | } | 1412 | } |
1413 | 1413 | ||
1414 | static int device_not_write_same_capable(struct dm_target *ti, struct dm_dev *dev, | 1414 | 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) | |||
1465 | continue; | 1465 | continue; |
1466 | 1466 | ||
1467 | if (ti->discards_supported) | 1467 | if (ti->discards_supported) |
1468 | return 1; | 1468 | return true; |
1469 | 1469 | ||
1470 | if (ti->type->iterate_devices && | 1470 | if (ti->type->iterate_devices && |
1471 | ti->type->iterate_devices(ti, device_discard_capable, NULL)) | 1471 | ti->type->iterate_devices(ti, device_discard_capable, NULL)) |
1472 | return 1; | 1472 | return true; |
1473 | } | 1473 | } |
1474 | 1474 | ||
1475 | return 0; | 1475 | return false; |
1476 | } | 1476 | } |
1477 | 1477 | ||
1478 | void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q, | 1478 | void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q, |