[PATCH 5/9] amdgpu/dal: Use true/false over integers for boolean vars
Edward O'Callaghan
eocallaghan at alterapraxis.com
Sat Apr 30 14:06:25 UTC 2016
Found-By: Coccinelle
Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c | 2 +-
drivers/gpu/drm/amd/dal/dc/calcs/bandwidth_calcs.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c b/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c
index b4f9750..e35a47b 100644
--- a/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c
+++ b/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c
@@ -1188,7 +1188,7 @@ uint8_t dal_adapter_service_get_func_controllers_num(
bool dal_adapter_service_is_feature_supported(
enum adapter_feature_id feature_id)
{
- bool data = 0;
+ bool data = false;
dal_adapter_service_get_feature_value(feature_id, &data, sizeof(bool));
diff --git a/drivers/gpu/drm/amd/dal/dc/calcs/bandwidth_calcs.c b/drivers/gpu/drm/amd/dal/dc/calcs/bandwidth_calcs.c
index 8a19139..c753b14 100644
--- a/drivers/gpu/drm/amd/dal/dc/calcs/bandwidth_calcs.c
+++ b/drivers/gpu/drm/amd/dal/dc/calcs/bandwidth_calcs.c
@@ -85,14 +85,14 @@ static void calculate_bandwidth(
/* maximum_number_of_surfaces-1: d1 display_write_back420 chroma*/
/* underlay luma and chroma surface parameters from spreadsheet*/
if (mode_data->d0_underlay_mode == bw_def_none) {
- d0_underlay_enable = 0;
+ d0_underlay_enable = false;
} else {
- d0_underlay_enable = 1;
+ d0_underlay_enable = true;
}
if (mode_data->d1_underlay_mode == bw_def_none) {
- d1_underlay_enable = 0;
+ d1_underlay_enable = false;
} else {
- d1_underlay_enable = 1;
+ d1_underlay_enable = true;
}
results->number_of_underlay_surfaces = d0_underlay_enable
+ d1_underlay_enable;
--
2.5.5
More information about the dri-devel
mailing list