* [PATCH] drm/amd/display: Conversion to bool not necessary
@ 2023-01-12 13:51 ` Deepak R Varma
0 siblings, 0 replies; 5+ messages in thread
From: Deepak R Varma @ 2023-01-12 13:51 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
amd-gfx, dri-devel, linux-kernel
Cc: Saurabh Singh Sengar, Praveen Kumar
A logical evaluation already results in bool. There is no need for using
a ternary operator based evaluation and bool conversion of the outcome.
Issue identified using boolconv.cocci Coccinelle semantic patch.
This was also reported by the Kernel Test Robot. Hence
Fixes: 473683a03495 ("drm/amd/display: Create a file dedicated for CRTC")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Deepak R Varma <drv@mailo.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
index 22125daf9dcf..1e39d0939700 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
@@ -105,8 +105,7 @@ static void vblank_control_worker(struct work_struct *work)
else if (dm->active_vblank_irq_count)
dm->active_vblank_irq_count--;
- dc_allow_idle_optimizations(
- dm->dc, dm->active_vblank_irq_count == 0 ? true : false);
+ dc_allow_idle_optimizations(dm->dc, dm->active_vblank_irq_count == 0);
DRM_DEBUG_KMS("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] drm/amd/display: Conversion to bool not necessary
@ 2023-01-12 13:51 ` Deepak R Varma
0 siblings, 0 replies; 5+ messages in thread
From: Deepak R Varma @ 2023-01-12 13:51 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
amd-gfx, dri-devel, linux-kernel
Cc: Praveen Kumar, Saurabh Singh Sengar
A logical evaluation already results in bool. There is no need for using
a ternary operator based evaluation and bool conversion of the outcome.
Issue identified using boolconv.cocci Coccinelle semantic patch.
This was also reported by the Kernel Test Robot. Hence
Fixes: 473683a03495 ("drm/amd/display: Create a file dedicated for CRTC")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Deepak R Varma <drv@mailo.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
index 22125daf9dcf..1e39d0939700 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
@@ -105,8 +105,7 @@ static void vblank_control_worker(struct work_struct *work)
else if (dm->active_vblank_irq_count)
dm->active_vblank_irq_count--;
- dc_allow_idle_optimizations(
- dm->dc, dm->active_vblank_irq_count == 0 ? true : false);
+ dc_allow_idle_optimizations(dm->dc, dm->active_vblank_irq_count == 0);
DRM_DEBUG_KMS("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/amd/display: Conversion to bool not necessary
2023-01-12 13:51 ` Deepak R Varma
(?)
@ 2023-01-12 19:33 ` Alex Deucher
-1 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2023-01-12 19:33 UTC (permalink / raw)
To: Deepak R Varma
Cc: Saurabh Singh Sengar, Leo Li, Pan, Xinhui, Rodrigo Siqueira,
linux-kernel, amd-gfx, Praveen Kumar, dri-devel, Alex Deucher,
Christian König
Applied. Thanks!
Alex
On Thu, Jan 12, 2023 at 8:51 AM Deepak R Varma <drv@mailo.com> wrote:
>
> A logical evaluation already results in bool. There is no need for using
> a ternary operator based evaluation and bool conversion of the outcome.
> Issue identified using boolconv.cocci Coccinelle semantic patch.
> This was also reported by the Kernel Test Robot. Hence
>
> Fixes: 473683a03495 ("drm/amd/display: Create a file dedicated for CRTC")
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Deepak R Varma <drv@mailo.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> index 22125daf9dcf..1e39d0939700 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> @@ -105,8 +105,7 @@ static void vblank_control_worker(struct work_struct *work)
> else if (dm->active_vblank_irq_count)
> dm->active_vblank_irq_count--;
>
> - dc_allow_idle_optimizations(
> - dm->dc, dm->active_vblank_irq_count == 0 ? true : false);
> + dc_allow_idle_optimizations(dm->dc, dm->active_vblank_irq_count == 0);
>
> DRM_DEBUG_KMS("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
>
> --
> 2.34.1
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/amd/display: Conversion to bool not necessary
@ 2023-01-12 19:33 ` Alex Deucher
0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2023-01-12 19:33 UTC (permalink / raw)
To: Deepak R Varma
Cc: Saurabh Singh Sengar, Leo Li, David Airlie, Pan, Xinhui,
Rodrigo Siqueira, linux-kernel, amd-gfx, Praveen Kumar,
dri-devel, Daniel Vetter, Alex Deucher, Harry Wentland,
Christian König
Applied. Thanks!
Alex
On Thu, Jan 12, 2023 at 8:51 AM Deepak R Varma <drv@mailo.com> wrote:
>
> A logical evaluation already results in bool. There is no need for using
> a ternary operator based evaluation and bool conversion of the outcome.
> Issue identified using boolconv.cocci Coccinelle semantic patch.
> This was also reported by the Kernel Test Robot. Hence
>
> Fixes: 473683a03495 ("drm/amd/display: Create a file dedicated for CRTC")
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Deepak R Varma <drv@mailo.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> index 22125daf9dcf..1e39d0939700 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> @@ -105,8 +105,7 @@ static void vblank_control_worker(struct work_struct *work)
> else if (dm->active_vblank_irq_count)
> dm->active_vblank_irq_count--;
>
> - dc_allow_idle_optimizations(
> - dm->dc, dm->active_vblank_irq_count == 0 ? true : false);
> + dc_allow_idle_optimizations(dm->dc, dm->active_vblank_irq_count == 0);
>
> DRM_DEBUG_KMS("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
>
> --
> 2.34.1
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/amd/display: Conversion to bool not necessary
@ 2023-01-12 19:33 ` Alex Deucher
0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2023-01-12 19:33 UTC (permalink / raw)
To: Deepak R Varma
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
amd-gfx, dri-devel, linux-kernel, Praveen Kumar,
Saurabh Singh Sengar
Applied. Thanks!
Alex
On Thu, Jan 12, 2023 at 8:51 AM Deepak R Varma <drv@mailo.com> wrote:
>
> A logical evaluation already results in bool. There is no need for using
> a ternary operator based evaluation and bool conversion of the outcome.
> Issue identified using boolconv.cocci Coccinelle semantic patch.
> This was also reported by the Kernel Test Robot. Hence
>
> Fixes: 473683a03495 ("drm/amd/display: Create a file dedicated for CRTC")
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Deepak R Varma <drv@mailo.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> index 22125daf9dcf..1e39d0939700 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> @@ -105,8 +105,7 @@ static void vblank_control_worker(struct work_struct *work)
> else if (dm->active_vblank_irq_count)
> dm->active_vblank_irq_count--;
>
> - dc_allow_idle_optimizations(
> - dm->dc, dm->active_vblank_irq_count == 0 ? true : false);
> + dc_allow_idle_optimizations(dm->dc, dm->active_vblank_irq_count == 0);
>
> DRM_DEBUG_KMS("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
>
> --
> 2.34.1
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-12 19:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12 13:51 [PATCH] drm/amd/display: Conversion to bool not necessary Deepak R Varma
2023-01-12 13:51 ` Deepak R Varma
2023-01-12 19:33 ` Alex Deucher
2023-01-12 19:33 ` Alex Deucher
2023-01-12 19:33 ` Alex Deucher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.