[next] drm/amdgpu/display: remove redundant continue statement
diff mbox series

Message ID 20210303132510.66904-1-colin.king@canonical.com
State Accepted
Commit 08f3dddb715cc62fa13a6bb7a95c856519d910df
Headers show
Series
  • [next] drm/amdgpu/display: remove redundant continue statement
Related show

Commit Message

Colin King March 3, 2021, 1:25 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The continue statement in a for-loop is redudant and can be removed.
Clean up the code to address this.

Addresses-Coverity: ("Continue as no effect")
Fixes: b6f91fc183f7 ("drm/amdgpu/display: buffer INTERRUPT_LOW_IRQ_CONTEXT interrupt work")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Alex Deucher March 5, 2021, 7:09 p.m. UTC | #1
Applied.  thanks.

Alex

On Wed, Mar 3, 2021 at 8:25 AM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The continue statement in a for-loop is redudant and can be removed.
> Clean up the code to address this.
>
> Addresses-Coverity: ("Continue as no effect")
> Fixes: b6f91fc183f7 ("drm/amdgpu/display: buffer INTERRUPT_LOW_IRQ_CONTEXT interrupt work")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c
> index 8ce10d0973c5..d3c687d07ee6 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c
> @@ -520,9 +520,7 @@ static void amdgpu_dm_irq_schedule_work(struct amdgpu_device *adev,
>                 return;
>
>         list_for_each_entry (handler_data, handler_list, list) {
> -               if (!queue_work(system_highpri_wq, &handler_data->work)) {
> -                       continue;
> -               } else {
> +               if (queue_work(system_highpri_wq, &handler_data->work)) {
>                         work_queued = true;
>                         break;
>                 }
> --
> 2.30.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Patch
diff mbox series

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c
index 8ce10d0973c5..d3c687d07ee6 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c
@@ -520,9 +520,7 @@  static void amdgpu_dm_irq_schedule_work(struct amdgpu_device *adev,
 		return;
 
 	list_for_each_entry (handler_data, handler_list, list) {
-		if (!queue_work(system_highpri_wq, &handler_data->work)) {
-			continue;
-		} else {
+		if (queue_work(system_highpri_wq, &handler_data->work)) {
 			work_queued = true;
 			break;
 		}