linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu/gfx10: Fix missing break in switch statement
@ 2019-07-21 22:39 Gustavo A. R. Silva
  2019-07-22 19:12 ` Alex Deucher
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-07-21 22:39 UTC (permalink / raw)
  To: Hawking Zhang, Alex Deucher, Christian König,
	David (ChunMing) Zhou, David Airlie, Daniel Vetter
  Cc: amd-gfx, dri-devel, linux-kernel, Gustavo A. R. Silva, Kees Cook

Add missing break statement in order to prevent the code from falling
through to case AMDGPU_IRQ_STATE_ENABLE.

This bug was found thanks to the ongoing efforts to enable
-Wimplicit-fallthrough.

Fixes: a644d85a5cd4 ("drm/amdgpu: add gfx v10 implementation (v10)")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 1675d5837c3c..35e8e29139b1 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -4611,6 +4611,7 @@ gfx_v10_0_set_gfx_eop_interrupt_state(struct amdgpu_device *adev,
 		cp_int_cntl = REG_SET_FIELD(cp_int_cntl, CP_INT_CNTL_RING0,
 					    TIME_STAMP_INT_ENABLE, 0);
 		WREG32(cp_int_cntl_reg, cp_int_cntl);
+		break;
 	case AMDGPU_IRQ_STATE_ENABLE:
 		cp_int_cntl = RREG32(cp_int_cntl_reg);
 		cp_int_cntl = REG_SET_FIELD(cp_int_cntl, CP_INT_CNTL_RING0,
-- 
2.22.0


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

* Re: [PATCH] drm/amdgpu/gfx10: Fix missing break in switch statement
  2019-07-21 22:39 [PATCH] drm/amdgpu/gfx10: Fix missing break in switch statement Gustavo A. R. Silva
@ 2019-07-22 19:12 ` Alex Deucher
  2019-07-22 19:14   ` Gustavo A. R. Silva
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2019-07-22 19:12 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Hawking Zhang, Alex Deucher, Christian König,
	David (ChunMing) Zhou, David Airlie, Daniel Vetter, Kees Cook,
	Maling list - DRI developers, amd-gfx list, LKML

On Sun, Jul 21, 2019 at 6:39 PM Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:
>
> Add missing break statement in order to prevent the code from falling
> through to case AMDGPU_IRQ_STATE_ENABLE.
>
> This bug was found thanks to the ongoing efforts to enable
> -Wimplicit-fallthrough.
>
> Fixes: a644d85a5cd4 ("drm/amdgpu: add gfx v10 implementation (v10)")
> Cc: stable@vger.kernel.org
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index 1675d5837c3c..35e8e29139b1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -4611,6 +4611,7 @@ gfx_v10_0_set_gfx_eop_interrupt_state(struct amdgpu_device *adev,
>                 cp_int_cntl = REG_SET_FIELD(cp_int_cntl, CP_INT_CNTL_RING0,
>                                             TIME_STAMP_INT_ENABLE, 0);
>                 WREG32(cp_int_cntl_reg, cp_int_cntl);
> +               break;
>         case AMDGPU_IRQ_STATE_ENABLE:
>                 cp_int_cntl = RREG32(cp_int_cntl_reg);
>                 cp_int_cntl = REG_SET_FIELD(cp_int_cntl, CP_INT_CNTL_RING0,
> --
> 2.22.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/amdgpu/gfx10: Fix missing break in switch statement
  2019-07-22 19:12 ` Alex Deucher
@ 2019-07-22 19:14   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-07-22 19:14 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Hawking Zhang, Alex Deucher, Christian König,
	David (ChunMing) Zhou, David Airlie, Daniel Vetter, Kees Cook,
	Maling list - DRI developers, amd-gfx list, LKML



On 7/22/19 2:12 PM, Alex Deucher wrote:
> On Sun, Jul 21, 2019 at 6:39 PM Gustavo A. R. Silva
> <gustavo@embeddedor.com> wrote:
>>
>> Add missing break statement in order to prevent the code from falling
>> through to case AMDGPU_IRQ_STATE_ENABLE.
>>
>> This bug was found thanks to the ongoing efforts to enable
>> -Wimplicit-fallthrough.
>>
>> Fixes: a644d85a5cd4 ("drm/amdgpu: add gfx v10 implementation (v10)")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> 
> Applied.  Thanks!
> 

Awesome! Glad to help. :)

Thanks
--
Gustavo

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

end of thread, other threads:[~2019-07-22 19:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-21 22:39 [PATCH] drm/amdgpu/gfx10: Fix missing break in switch statement Gustavo A. R. Silva
2019-07-22 19:12 ` Alex Deucher
2019-07-22 19:14   ` Gustavo A. R. Silva

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