dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/14] drm/radeon: remove comparison to bool
@ 2020-05-06 14:33 Zheng Bin
  2020-05-06 14:33 ` [PATCH 01/14] drm/radeon: remove comparison to bool in btc_dpm.c Zheng Bin
                   ` (14 more replies)
  0 siblings, 15 replies; 17+ messages in thread
From: Zheng Bin @ 2020-05-06 14:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, amd-gfx, dri-devel
  Cc: zhengbin13

Zheng Bin (14):
  drm/radeon: remove comparison to bool in btc_dpm.c
  drm/radeon: remove comparison to bool in ci_dpm.c
  drm/radeon: remove comparison to bool in ni_dpm.c
  drm/radeon: remove comparison to bool in radeon_atpx_handler.c
  drm/radeon: remove comparison to bool in radeon_object.c
  drm/radeon: remove comparison to bool in radeon_ttm.c
  drm/radeon: remove comparison to bool in r100.c
  drm/radeon: remove comparison to bool in r300.c
  drm/radeon: remove comparison to bool in r600.c
  drm/radeon: remove comparison to bool in rs600.c
  drm/radeon: remove comparison to bool in rs690.c
  drm/radeon: remove comparison to bool in rv6xx_dpm.c
  drm/radeon: remove comparison to bool in rv515.c
  drm/radeon: remove comparison to bool in si_dpm.c

 drivers/gpu/drm/radeon/btc_dpm.c             | 2 +-
 drivers/gpu/drm/radeon/ci_dpm.c              | 4 ++--
 drivers/gpu/drm/radeon/ni_dpm.c              | 6 +++---
 drivers/gpu/drm/radeon/r100.c                | 2 +-
 drivers/gpu/drm/radeon/r300.c                | 2 +-
 drivers/gpu/drm/radeon/r600.c                | 3 ++-
 drivers/gpu/drm/radeon/radeon_atpx_handler.c | 4 ++--
 drivers/gpu/drm/radeon/radeon_object.c       | 2 +-
 drivers/gpu/drm/radeon/radeon_ttm.c          | 2 +-
 drivers/gpu/drm/radeon/rs600.c               | 2 +-
 drivers/gpu/drm/radeon/rs690.c               | 3 ++-
 drivers/gpu/drm/radeon/rv515.c               | 2 +-
 drivers/gpu/drm/radeon/rv6xx_dpm.c           | 2 +-
 drivers/gpu/drm/radeon/si_dpm.c              | 6 +++---
 14 files changed, 22 insertions(+), 20 deletions(-)

--
2.26.0.106.g9fadedd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 01/14] drm/radeon: remove comparison to bool in btc_dpm.c
  2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
@ 2020-05-06 14:33 ` Zheng Bin
  2020-05-06 14:33 ` [PATCH 02/14] drm/radeon: remove comparison to bool in ci_dpm.c Zheng Bin
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Zheng Bin @ 2020-05-06 14:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, amd-gfx, dri-devel
  Cc: zhengbin13

Fixes coccicheck warning:

drivers/gpu/drm/radeon/btc_dpm.c:2115:5-26: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/radeon/btc_dpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c
index d1d8aaf8323c..60b32eba6f46 100644
--- a/drivers/gpu/drm/radeon/btc_dpm.c
+++ b/drivers/gpu/drm/radeon/btc_dpm.c
@@ -2112,7 +2112,7 @@ static void btc_apply_state_adjust_rules(struct radeon_device *rdev,
 	else
 		max_limits = &rdev->pm.dpm.dyn_state.max_clock_voltage_on_dc;

-	if (rdev->pm.dpm.ac_power == false) {
+	if (!rdev->pm.dpm.ac_power) {
 		if (ps->high.mclk > max_limits->mclk)
 			ps->high.mclk = max_limits->mclk;
 		if (ps->high.sclk > max_limits->sclk)
--
2.26.0.106.g9fadedd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 02/14] drm/radeon: remove comparison to bool in ci_dpm.c
  2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
  2020-05-06 14:33 ` [PATCH 01/14] drm/radeon: remove comparison to bool in btc_dpm.c Zheng Bin
@ 2020-05-06 14:33 ` Zheng Bin
  2020-05-06 14:33 ` [PATCH 03/14] drm/radeon: remove comparison to bool in ni_dpm.c Zheng Bin
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Zheng Bin @ 2020-05-06 14:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, amd-gfx, dri-devel
  Cc: zhengbin13

Fixes coccicheck warning:

drivers/gpu/drm/radeon/ci_dpm.c:814:5-26: WARNING: Comparison to bool
drivers/gpu/drm/radeon/ci_dpm.c:2916:6-21: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/radeon/ci_dpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c
index 134aa2b01f90..c77ca911a8b6 100644
--- a/drivers/gpu/drm/radeon/ci_dpm.c
+++ b/drivers/gpu/drm/radeon/ci_dpm.c
@@ -811,7 +811,7 @@ static void ci_apply_state_adjust_rules(struct radeon_device *rdev,
 	else
 		max_limits = &rdev->pm.dpm.dyn_state.max_clock_voltage_on_dc;

-	if (rdev->pm.dpm.ac_power == false) {
+	if (!rdev->pm.dpm.ac_power) {
 		for (i = 0; i < ps->performance_level_count; i++) {
 			if (ps->performance_levels[i].mclk > max_limits->mclk)
 				ps->performance_levels[i].mclk = max_limits->mclk;
@@ -2913,7 +2913,7 @@ static int ci_populate_single_memory_level(struct radeon_device *rdev,

 	if (pi->mclk_stutter_mode_threshold &&
 	    (memory_clock <= pi->mclk_stutter_mode_threshold) &&
-	    (pi->uvd_enabled == false) &&
+	    !pi->uvd_enabled &&
 	    (RREG32(DPG_PIPE_STUTTER_CONTROL) & STUTTER_ENABLE) &&
 	    (rdev->pm.dpm.new_active_crtc_count <= 2))
 		memory_level->StutterEnable = true;
--
2.26.0.106.g9fadedd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 03/14] drm/radeon: remove comparison to bool in ni_dpm.c
  2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
  2020-05-06 14:33 ` [PATCH 01/14] drm/radeon: remove comparison to bool in btc_dpm.c Zheng Bin
  2020-05-06 14:33 ` [PATCH 02/14] drm/radeon: remove comparison to bool in ci_dpm.c Zheng Bin
@ 2020-05-06 14:33 ` Zheng Bin
  2020-05-06 14:33 ` [PATCH 04/14] drm/radeon: remove comparison to bool in radeon_atpx_handler.c Zheng Bin
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Zheng Bin @ 2020-05-06 14:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, amd-gfx, dri-devel
  Cc: zhengbin13

Fixes coccicheck warning:

drivers/gpu/drm/radeon/ni_dpm.c:807:5-26: WARNING: Comparison to bool
drivers/gpu/drm/radeon/ni_dpm.c:2466:5-36: WARNING: Comparison to boo
drivers/gpu/drm/radeon/ni_dpm.c:3146:5-22: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/radeon/ni_dpm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c
index b57c37ddd164..66c48ce107a5 100644
--- a/drivers/gpu/drm/radeon/ni_dpm.c
+++ b/drivers/gpu/drm/radeon/ni_dpm.c
@@ -804,7 +804,7 @@ static void ni_apply_state_adjust_rules(struct radeon_device *rdev,
 	else
 		max_limits = &rdev->pm.dpm.dyn_state.max_clock_voltage_on_dc;

-	if (rdev->pm.dpm.ac_power == false) {
+	if (!rdev->pm.dpm.ac_power) {
 		for (i = 0; i < ps->performance_level_count; i++) {
 			if (ps->performance_levels[i].mclk > max_limits->mclk)
 				ps->performance_levels[i].mclk = max_limits->mclk;
@@ -2463,7 +2463,7 @@ static int ni_populate_power_containment_values(struct radeon_device *rdev,
 	u32 power_boost_limit;
 	u8 max_ps_percent;

-	if (ni_pi->enable_power_containment == false)
+	if (!ni_pi->enable_power_containment)
 		return 0;

 	if (state->performance_level_count == 0)
@@ -3143,7 +3143,7 @@ static int ni_initialize_smc_cac_tables(struct radeon_device *rdev)
 	int i, ret;
 	u32 reg;

-	if (ni_pi->enable_cac == false)
+	if (!ni_pi->enable_cac)
 		return 0;

 	cac_tables = kzalloc(sizeof(PP_NIslands_CACTABLES), GFP_KERNEL);
--
2.26.0.106.g9fadedd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 04/14] drm/radeon: remove comparison to bool in radeon_atpx_handler.c
  2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
                   ` (2 preceding siblings ...)
  2020-05-06 14:33 ` [PATCH 03/14] drm/radeon: remove comparison to bool in ni_dpm.c Zheng Bin
@ 2020-05-06 14:33 ` Zheng Bin
  2020-05-06 14:33 ` [PATCH 05/14] drm/radeon: remove comparison to bool in radeon_object.c Zheng Bin
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Zheng Bin @ 2020-05-06 14:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, amd-gfx, dri-devel
  Cc: zhengbin13

Fixes coccicheck warning:

drivers/gpu/drm/radeon/radeon_atpx_handler.c:561:15-49: WARNING: Comparison to bool
drivers/gpu/drm/radeon/radeon_atpx_handler.c:571:15-49: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/radeon/radeon_atpx_handler.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
index 6f93f54bf651..6131917322b4 100644
--- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c
+++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
@@ -558,7 +558,7 @@ static bool radeon_atpx_detect(void)
 	while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
 		vga_count++;

-		has_atpx |= (radeon_atpx_pci_probe_handle(pdev) == true);
+		has_atpx |= radeon_atpx_pci_probe_handle(pdev);

 		parent_pdev = pci_upstream_bridge(pdev);
 		d3_supported |= parent_pdev && parent_pdev->bridge_d3;
@@ -568,7 +568,7 @@ static bool radeon_atpx_detect(void)
 	while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_OTHER << 8, pdev)) != NULL) {
 		vga_count++;

-		has_atpx |= (radeon_atpx_pci_probe_handle(pdev) == true);
+		has_atpx |= radeon_atpx_pci_probe_handle(pdev);

 		parent_pdev = pci_upstream_bridge(pdev);
 		d3_supported |= parent_pdev && parent_pdev->bridge_d3;
--
2.26.0.106.g9fadedd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 05/14] drm/radeon: remove comparison to bool in radeon_object.c
  2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
                   ` (3 preceding siblings ...)
  2020-05-06 14:33 ` [PATCH 04/14] drm/radeon: remove comparison to bool in radeon_atpx_handler.c Zheng Bin
@ 2020-05-06 14:33 ` Zheng Bin
  2020-05-06 14:33 ` [PATCH 06/14] drm/radeon: remove comparison to bool in radeon_ttm.c Zheng Bin
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Zheng Bin @ 2020-05-06 14:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, amd-gfx, dri-devel
  Cc: zhengbin13

Fixes coccicheck warning:

drivers/gpu/drm/radeon/radeon_object.c:427:6-35: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/radeon/radeon_object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index 140d94cc080d..f06c5e9dc72c 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -424,7 +424,7 @@ int radeon_bo_evict_vram(struct radeon_device *rdev)
 	/* late 2.6.33 fix IGP hibernate - we need pm ops to do this correct */
 #ifndef CONFIG_HIBERNATION
 	if (rdev->flags & RADEON_IS_IGP) {
-		if (rdev->mc.igp_sideport_enabled == false)
+		if (!rdev->mc.igp_sideport_enabled)
 			/* Useless to evict on IGP chips */
 			return 0;
 	}
--
2.26.0.106.g9fadedd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 06/14] drm/radeon: remove comparison to bool in radeon_ttm.c
  2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
                   ` (4 preceding siblings ...)
  2020-05-06 14:33 ` [PATCH 05/14] drm/radeon: remove comparison to bool in radeon_object.c Zheng Bin
@ 2020-05-06 14:33 ` Zheng Bin
  2020-05-06 14:33 ` [PATCH 07/14] drm/radeon: remove comparison to bool in r100.c Zheng Bin
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Zheng Bin @ 2020-05-06 14:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, amd-gfx, dri-devel
  Cc: zhengbin13

Fixes coccicheck warning:

drivers/gpu/drm/radeon/radeon_ttm.c:141:6-62: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 5d50c9edbe80..d1fcb5f995b0 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -138,7 +138,7 @@ static void radeon_evict_flags(struct ttm_buffer_object *bo,
 	rbo = container_of(bo, struct radeon_bo, tbo);
 	switch (bo->mem.mem_type) {
 	case TTM_PL_VRAM:
-		if (rbo->rdev->ring[radeon_copy_ring_index(rbo->rdev)].ready == false)
+		if (!rbo->rdev->ring[radeon_copy_ring_index(rbo->rdev)].ready)
 			radeon_ttm_placement_from_domain(rbo, RADEON_GEM_DOMAIN_CPU);
 		else if (rbo->rdev->mc.visible_vram_size < rbo->rdev->mc.real_vram_size &&
 			 bo->mem.start < (rbo->rdev->mc.visible_vram_size >> PAGE_SHIFT)) {
--
2.26.0.106.g9fadedd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 07/14] drm/radeon: remove comparison to bool in r100.c
  2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
                   ` (5 preceding siblings ...)
  2020-05-06 14:33 ` [PATCH 06/14] drm/radeon: remove comparison to bool in radeon_ttm.c Zheng Bin
@ 2020-05-06 14:33 ` Zheng Bin
  2020-05-06 14:33 ` [PATCH 08/14] drm/radeon: remove comparison to bool in r300.c Zheng Bin
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Zheng Bin @ 2020-05-06 14:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, amd-gfx, dri-devel
  Cc: zhengbin13

Fixes coccicheck warning:

drivers/gpu/drm/radeon/r100.c:4065:5-37: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/radeon/r100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 24c8db673931..298a9c22074a 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -4062,7 +4062,7 @@ int r100_init(struct radeon_device *rdev)
 			RREG32(R_0007C0_CP_STAT));
 	}
 	/* check if cards are posted or not */
-	if (radeon_boot_test_post_card(rdev) == false)
+	if (!radeon_boot_test_post_card(rdev))
 		return -EINVAL;
 	/* Set asic errata */
 	r100_errata(rdev);
--
2.26.0.106.g9fadedd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 08/14] drm/radeon: remove comparison to bool in r300.c
  2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
                   ` (6 preceding siblings ...)
  2020-05-06 14:33 ` [PATCH 07/14] drm/radeon: remove comparison to bool in r100.c Zheng Bin
@ 2020-05-06 14:33 ` Zheng Bin
  2020-05-06 14:33 ` [PATCH 09/14] drm/radeon: remove comparison to bool in r600.c Zheng Bin
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Zheng Bin @ 2020-05-06 14:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, amd-gfx, dri-devel
  Cc: zhengbin13

Fixes coccicheck warning:

drivers/gpu/drm/radeon/r300.c:1544:5-37: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/radeon/r300.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index 3b7ead5be5bf..26448b6e97e6 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -1541,7 +1541,7 @@ int r300_init(struct radeon_device *rdev)
 			RREG32(R_0007C0_CP_STAT));
 	}
 	/* check if cards are posted or not */
-	if (radeon_boot_test_post_card(rdev) == false)
+	if (!radeon_boot_test_post_card(rdev))
 		return -EINVAL;
 	/* Set asic errata */
 	r300_errata(rdev);
--
2.26.0.106.g9fadedd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 09/14] drm/radeon: remove comparison to bool in r600.c
  2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
                   ` (7 preceding siblings ...)
  2020-05-06 14:33 ` [PATCH 08/14] drm/radeon: remove comparison to bool in r300.c Zheng Bin
@ 2020-05-06 14:33 ` Zheng Bin
  2020-05-06 14:33 ` [PATCH 10/14] drm/radeon: remove comparison to bool in rs600.c Zheng Bin
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Zheng Bin @ 2020-05-06 14:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, amd-gfx, dri-devel
  Cc: zhengbin13

Fixes coccicheck warning:

drivers/gpu/drm/radeon/r600.c:1494:8-37: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/radeon/r600.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index d9a33ca768f3..a37f50907107 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -1491,7 +1491,8 @@ static int r600_mc_init(struct radeon_device *rdev)
 				/* FastFB shall be used with UMA memory. Here it is simply disabled when sideport
 		 		* memory is present.
 		 		*/
-				if (rdev->mc.igp_sideport_enabled == false && radeon_fastfb == 1) {
+				if (!rdev->mc.igp_sideport_enabled &&
+				    radeon_fastfb == 1) {
 					DRM_INFO("Direct mapping: aper base at 0x%llx, replaced by direct mapping base 0x%llx.\n",
 						(unsigned long long)rdev->mc.aper_base, k8_addr);
 					rdev->mc.aper_base = (resource_size_t)k8_addr;
--
2.26.0.106.g9fadedd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 10/14] drm/radeon: remove comparison to bool in rs600.c
  2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
                   ` (8 preceding siblings ...)
  2020-05-06 14:33 ` [PATCH 09/14] drm/radeon: remove comparison to bool in r600.c Zheng Bin
@ 2020-05-06 14:33 ` Zheng Bin
  2020-05-06 14:33 ` [PATCH 11/14] drm/radeon: remove comparison to bool in rs690.c Zheng Bin
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Zheng Bin @ 2020-05-06 14:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, amd-gfx, dri-devel
  Cc: zhengbin13

Fixes coccicheck warning:

drivers/gpu/drm/radeon/rs600.c:1132:5-37: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/radeon/rs600.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
index c88b4906f7bc..a7ff0609a3eb 100644
--- a/drivers/gpu/drm/radeon/rs600.c
+++ b/drivers/gpu/drm/radeon/rs600.c
@@ -1129,7 +1129,7 @@ int rs600_init(struct radeon_device *rdev)
 			RREG32(R_0007C0_CP_STAT));
 	}
 	/* check if cards are posted or not */
-	if (radeon_boot_test_post_card(rdev) == false)
+	if (!radeon_boot_test_post_card(rdev))
 		return -EINVAL;

 	/* Initialize clocks */
--
2.26.0.106.g9fadedd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 11/14] drm/radeon: remove comparison to bool in rs690.c
  2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
                   ` (9 preceding siblings ...)
  2020-05-06 14:33 ` [PATCH 10/14] drm/radeon: remove comparison to bool in rs600.c Zheng Bin
@ 2020-05-06 14:33 ` Zheng Bin
  2020-05-06 14:33 ` [PATCH 12/14] drm/radeon: remove comparison to bool in rv6xx_dpm.c Zheng Bin
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Zheng Bin @ 2020-05-06 14:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, amd-gfx, dri-devel
  Cc: zhengbin13

Fixes coccicheck warning:

drivers/gpu/drm/radeon/rs690.c:190:6-35: WARNING: Comparison to bool
drivers/gpu/drm/radeon/rs690.c:844:5-37: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/radeon/rs690.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c
index c296f94f9700..ddc3bfbb557c 100644
--- a/drivers/gpu/drm/radeon/rs690.c
+++ b/drivers/gpu/drm/radeon/rs690.c
@@ -187,7 +187,8 @@ static void rs690_mc_init(struct radeon_device *rdev)
 		/* FastFB shall be used with UMA memory. Here it is simply disabled when sideport
 		 * memory is present.
 		 */
-		if (rdev->mc.igp_sideport_enabled == false && radeon_fastfb == 1) {
+		if (!rdev->mc.igp_sideport_enabled &&
+		    radeon_fastfb == 1) {
 			DRM_INFO("Direct mapping: aper base at 0x%llx, replaced by direct mapping base 0x%llx.\n",
 					(unsigned long long)rdev->mc.aper_base, k8_addr);
 			rdev->mc.aper_base = (resource_size_t)k8_addr;
--
2.26.0.106.g9fadedd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 12/14] drm/radeon: remove comparison to bool in rv6xx_dpm.c
  2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
                   ` (10 preceding siblings ...)
  2020-05-06 14:33 ` [PATCH 11/14] drm/radeon: remove comparison to bool in rs690.c Zheng Bin
@ 2020-05-06 14:33 ` Zheng Bin
  2020-05-06 14:33 ` [PATCH 13/14] drm/radeon: remove comparison to bool in rv515.c Zheng Bin
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Zheng Bin @ 2020-05-06 14:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, amd-gfx, dri-devel
  Cc: zhengbin13

Fixes coccicheck warning:

drivers/gpu/drm/radeon/rv6xx_dpm.c:1571:5-20: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/radeon/rv6xx_dpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/rv6xx_dpm.c b/drivers/gpu/drm/radeon/rv6xx_dpm.c
index 69d380fff22a..ebdb937730c2 100644
--- a/drivers/gpu/drm/radeon/rv6xx_dpm.c
+++ b/drivers/gpu/drm/radeon/rv6xx_dpm.c
@@ -1568,7 +1568,7 @@ int rv6xx_dpm_enable(struct radeon_device *rdev)
 	rv6xx_program_engine_speed_parameters(rdev);

 	rv6xx_enable_display_gap(rdev, true);
-	if (pi->display_gap == false)
+	if (!pi->display_gap)
 		rv6xx_enable_display_gap(rdev, false);

 	rv6xx_program_power_level_enter_state(rdev);
--
2.26.0.106.g9fadedd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 13/14] drm/radeon: remove comparison to bool in rv515.c
  2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
                   ` (11 preceding siblings ...)
  2020-05-06 14:33 ` [PATCH 12/14] drm/radeon: remove comparison to bool in rv6xx_dpm.c Zheng Bin
@ 2020-05-06 14:33 ` Zheng Bin
  2020-05-06 14:33 ` [PATCH 14/14] drm/radeon: remove comparison to bool in si_dpm.c Zheng Bin
  2020-05-06 16:00 ` [PATCH 00/14] drm/radeon: remove comparison to bool Alex Deucher
  14 siblings, 0 replies; 17+ messages in thread
From: Zheng Bin @ 2020-05-06 14:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, amd-gfx, dri-devel
  Cc: zhengbin13

Fixes coccicheck warning:

drivers/gpu/drm/radeon/rv515.c:666:5-37: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/radeon/rv515.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/rv515.c b/drivers/gpu/drm/radeon/rv515.c
index 147e5cf8348d..77e6b9dcdb69 100644
--- a/drivers/gpu/drm/radeon/rv515.c
+++ b/drivers/gpu/drm/radeon/rv515.c
@@ -663,7 +663,7 @@ int rv515_init(struct radeon_device *rdev)
 			RREG32(R_0007C0_CP_STAT));
 	}
 	/* check if cards are posted or not */
-	if (radeon_boot_test_post_card(rdev) == false)
+	if (!radeon_boot_test_post_card(rdev))
 		return -EINVAL;
 	/* Initialize clocks */
 	radeon_get_clock_info(rdev->ddev);
--
2.26.0.106.g9fadedd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 14/14] drm/radeon: remove comparison to bool in si_dpm.c
  2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
                   ` (12 preceding siblings ...)
  2020-05-06 14:33 ` [PATCH 13/14] drm/radeon: remove comparison to bool in rv515.c Zheng Bin
@ 2020-05-06 14:33 ` Zheng Bin
  2020-05-06 16:00 ` [PATCH 00/14] drm/radeon: remove comparison to bool Alex Deucher
  14 siblings, 0 replies; 17+ messages in thread
From: Zheng Bin @ 2020-05-06 14:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, amd-gfx, dri-devel
  Cc: zhengbin13

Fixes coccicheck warning:

drivers/gpu/drm/radeon/si_dpm.c:1885:7-44: WARNING: Comparison to bool
drivers/gpu/drm/radeon/si_dpm.c:2463:5-22: WARNING: Comparison to bool
drivers/gpu/drm/radeon/si_dpm.c:3015:5-26: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/radeon/si_dpm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index a167e1c36d24..98e288e5d8c9 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -1882,7 +1882,7 @@ static void si_initialize_powertune_defaults(struct radeon_device *rdev)
 			update_dte_from_pl2 = true;
 			break;
 		default:
-			if (si_pi->dte_data.enable_dte_by_default == true)
+			if (si_pi->dte_data.enable_dte_by_default)
 				DRM_ERROR("DTE is not enabled!\n");
 			break;
 		}
@@ -2460,7 +2460,7 @@ static int si_initialize_smc_dte_tables(struct radeon_device *rdev)
 	if (dte_data == NULL)
 		si_pi->enable_dte = false;

-	if (si_pi->enable_dte == false)
+	if (!si_pi->enable_dte)
 		return 0;

 	if (dte_data->k <= 0)
@@ -3012,7 +3012,7 @@ static void si_apply_state_adjust_rules(struct radeon_device *rdev,
 		if (ps->performance_levels[i].vddc > ps->performance_levels[i+1].vddc)
 			ps->performance_levels[i].vddc = ps->performance_levels[i+1].vddc;
 	}
-	if (rdev->pm.dpm.ac_power == false) {
+	if (!rdev->pm.dpm.ac_power) {
 		for (i = 0; i < ps->performance_level_count; i++) {
 			if (ps->performance_levels[i].mclk > max_limits->mclk)
 				ps->performance_levels[i].mclk = max_limits->mclk;
--
2.26.0.106.g9fadedd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 00/14] drm/radeon: remove comparison to bool
  2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
                   ` (13 preceding siblings ...)
  2020-05-06 14:33 ` [PATCH 14/14] drm/radeon: remove comparison to bool in si_dpm.c Zheng Bin
@ 2020-05-06 16:00 ` Alex Deucher
  14 siblings, 0 replies; 17+ messages in thread
From: Alex Deucher @ 2020-05-06 16:00 UTC (permalink / raw)
  To: Zheng Bin
  Cc: Dave Airlie, amd-gfx list, Maling list - DRI developers, Deucher,
	Alexander, Christian Koenig

On Wed, May 6, 2020 at 10:27 AM Zheng Bin <zhengbin13@huawei.com> wrote:
>
> Zheng Bin (14):
>   drm/radeon: remove comparison to bool in btc_dpm.c
>   drm/radeon: remove comparison to bool in ci_dpm.c
>   drm/radeon: remove comparison to bool in ni_dpm.c
>   drm/radeon: remove comparison to bool in radeon_atpx_handler.c
>   drm/radeon: remove comparison to bool in radeon_object.c
>   drm/radeon: remove comparison to bool in radeon_ttm.c
>   drm/radeon: remove comparison to bool in r100.c
>   drm/radeon: remove comparison to bool in r300.c
>   drm/radeon: remove comparison to bool in r600.c
>   drm/radeon: remove comparison to bool in rs600.c
>   drm/radeon: remove comparison to bool in rs690.c
>   drm/radeon: remove comparison to bool in rv6xx_dpm.c
>   drm/radeon: remove comparison to bool in rv515.c
>   drm/radeon: remove comparison to bool in si_dpm.c

Does the checker need to be fixed?  All of these are comparing boolean
variables to true/false.  Seems like needless code churn to me.

Alex

>
>  drivers/gpu/drm/radeon/btc_dpm.c             | 2 +-
>  drivers/gpu/drm/radeon/ci_dpm.c              | 4 ++--
>  drivers/gpu/drm/radeon/ni_dpm.c              | 6 +++---
>  drivers/gpu/drm/radeon/r100.c                | 2 +-
>  drivers/gpu/drm/radeon/r300.c                | 2 +-
>  drivers/gpu/drm/radeon/r600.c                | 3 ++-
>  drivers/gpu/drm/radeon/radeon_atpx_handler.c | 4 ++--
>  drivers/gpu/drm/radeon/radeon_object.c       | 2 +-
>  drivers/gpu/drm/radeon/radeon_ttm.c          | 2 +-
>  drivers/gpu/drm/radeon/rs600.c               | 2 +-
>  drivers/gpu/drm/radeon/rs690.c               | 3 ++-
>  drivers/gpu/drm/radeon/rv515.c               | 2 +-
>  drivers/gpu/drm/radeon/rv6xx_dpm.c           | 2 +-
>  drivers/gpu/drm/radeon/si_dpm.c              | 6 +++---
>  14 files changed, 22 insertions(+), 20 deletions(-)
>
> --
> 2.26.0.106.g9fadedd
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 00/14] drm/radeon: remove comparison to bool
@ 2020-05-06 16:36 Koenig, Christian
  0 siblings, 0 replies; 17+ messages in thread
From: Koenig, Christian @ 2020-05-06 16:36 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Dave Airlie, amd-gfx list, Zheng Bin,
	Maling list - DRI developers, Deucher, Alexander


[-- Attachment #1.1: Type: text/plain, Size: 2601 bytes --]



Am 06.05.2020 18:00 schrieb Alex Deucher <alexdeucher@gmail.com>:
On Wed, May 6, 2020 at 10:27 AM Zheng Bin <zhengbin13@huawei.com> wrote:
>
> Zheng Bin (14):
>   drm/radeon: remove comparison to bool in btc_dpm.c
>   drm/radeon: remove comparison to bool in ci_dpm.c
>   drm/radeon: remove comparison to bool in ni_dpm.c
>   drm/radeon: remove comparison to bool in radeon_atpx_handler.c
>   drm/radeon: remove comparison to bool in radeon_object.c
>   drm/radeon: remove comparison to bool in radeon_ttm.c
>   drm/radeon: remove comparison to bool in r100.c
>   drm/radeon: remove comparison to bool in r300.c
>   drm/radeon: remove comparison to bool in r600.c
>   drm/radeon: remove comparison to bool in rs600.c
>   drm/radeon: remove comparison to bool in rs690.c
>   drm/radeon: remove comparison to bool in rv6xx_dpm.c
>   drm/radeon: remove comparison to bool in rv515.c
>   drm/radeon: remove comparison to bool in si_dpm.c

Does the checker need to be fixed?  All of these are comparing boolean
variables to true/false.  Seems like needless code churn to me.

We should probably make sure that no new code like this leaks in, but I also don't see that this is necessary for the old driver stack.

Christian.


Alex

>
>  drivers/gpu/drm/radeon/btc_dpm.c             | 2 +-
>  drivers/gpu/drm/radeon/ci_dpm.c              | 4 ++--
>  drivers/gpu/drm/radeon/ni_dpm.c              | 6 +++---
>  drivers/gpu/drm/radeon/r100.c                | 2 +-
>  drivers/gpu/drm/radeon/r300.c                | 2 +-
>  drivers/gpu/drm/radeon/r600.c                | 3 ++-
>  drivers/gpu/drm/radeon/radeon_atpx_handler.c | 4 ++--
>  drivers/gpu/drm/radeon/radeon_object.c       | 2 +-
>  drivers/gpu/drm/radeon/radeon_ttm.c          | 2 +-
>  drivers/gpu/drm/radeon/rs600.c               | 2 +-
>  drivers/gpu/drm/radeon/rs690.c               | 3 ++-
>  drivers/gpu/drm/radeon/rv515.c               | 2 +-
>  drivers/gpu/drm/radeon/rv6xx_dpm.c           | 2 +-
>  drivers/gpu/drm/radeon/si_dpm.c              | 6 +++---
>  14 files changed, 22 insertions(+), 20 deletions(-)
>
> --
> 2.26.0.106.g9fadedd
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cchristian.koenig%40amd.com%7C10c2a90728574bb20ef208d7f1d69e2b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637243776401264275&amp;sdata=Z6alCS8hPA7rWNKHimpkc6zBldtBagK0dGpX8mTOEZA%3D&amp;reserved=0


[-- Attachment #1.2: Type: text/html, Size: 5311 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2020-05-07  7:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 14:33 [PATCH 00/14] drm/radeon: remove comparison to bool Zheng Bin
2020-05-06 14:33 ` [PATCH 01/14] drm/radeon: remove comparison to bool in btc_dpm.c Zheng Bin
2020-05-06 14:33 ` [PATCH 02/14] drm/radeon: remove comparison to bool in ci_dpm.c Zheng Bin
2020-05-06 14:33 ` [PATCH 03/14] drm/radeon: remove comparison to bool in ni_dpm.c Zheng Bin
2020-05-06 14:33 ` [PATCH 04/14] drm/radeon: remove comparison to bool in radeon_atpx_handler.c Zheng Bin
2020-05-06 14:33 ` [PATCH 05/14] drm/radeon: remove comparison to bool in radeon_object.c Zheng Bin
2020-05-06 14:33 ` [PATCH 06/14] drm/radeon: remove comparison to bool in radeon_ttm.c Zheng Bin
2020-05-06 14:33 ` [PATCH 07/14] drm/radeon: remove comparison to bool in r100.c Zheng Bin
2020-05-06 14:33 ` [PATCH 08/14] drm/radeon: remove comparison to bool in r300.c Zheng Bin
2020-05-06 14:33 ` [PATCH 09/14] drm/radeon: remove comparison to bool in r600.c Zheng Bin
2020-05-06 14:33 ` [PATCH 10/14] drm/radeon: remove comparison to bool in rs600.c Zheng Bin
2020-05-06 14:33 ` [PATCH 11/14] drm/radeon: remove comparison to bool in rs690.c Zheng Bin
2020-05-06 14:33 ` [PATCH 12/14] drm/radeon: remove comparison to bool in rv6xx_dpm.c Zheng Bin
2020-05-06 14:33 ` [PATCH 13/14] drm/radeon: remove comparison to bool in rv515.c Zheng Bin
2020-05-06 14:33 ` [PATCH 14/14] drm/radeon: remove comparison to bool in si_dpm.c Zheng Bin
2020-05-06 16:00 ` [PATCH 00/14] drm/radeon: remove comparison to bool Alex Deucher
2020-05-06 16:36 Koenig, Christian

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).