* [PATCH] drm/amd/powerplay: Fix missing break in switch
@ 2019-01-25 21:55 Gustavo A. R. Silva
2019-01-28 16:19 ` Alex Deucher
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Gustavo A. R. Silva @ 2019-01-25 21:55 UTC (permalink / raw)
To: Rex Zhu, Evan Quan, 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 the default case.
The resoning for this is that pclk_vol_table is an automatic variable.
So, it makes no sense to update it just before falling through to the
default case and return -EINVAL.
This bug was found thanks to the ongoing efforts to enabling
-Wimplicit-fallthrough.
Fixes: cd70f3d6e3fa ("drm/amd/powerplay: PP/DAL interface changes for dynamic clock switch")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
index f95c5f50eb0f..5273de3c5b98 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
@@ -1033,6 +1033,7 @@ static int smu10_get_clock_by_type_with_latency(struct pp_hwmgr *hwmgr,
break;
case amd_pp_dpp_clock:
pclk_vol_table = pinfo->vdd_dep_on_dppclk;
+ break;
default:
return -EINVAL;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/powerplay: Fix missing break in switch
2019-01-25 21:55 [PATCH] drm/amd/powerplay: Fix missing break in switch Gustavo A. R. Silva
@ 2019-01-28 16:19 ` Alex Deucher
2019-01-29 0:35 ` Sasha Levin
2019-01-29 0:35 ` Sasha Levin
2 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2019-01-28 16:19 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Rex Zhu, Evan Quan, Alex Deucher, Christian König,
David (ChunMing) Zhou, David Airlie, Daniel Vetter, Kees Cook,
Maling list - DRI developers, amd-gfx list, LKML
On Fri, Jan 25, 2019 at 5:31 PM Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:
>
> Add missing break statement in order to prevent the code from falling
> through to the default case.
>
> The resoning for this is that pclk_vol_table is an automatic variable.
> So, it makes no sense to update it just before falling through to the
> default case and return -EINVAL.
>
> This bug was found thanks to the ongoing efforts to enabling
> -Wimplicit-fallthrough.
>
> Fixes: cd70f3d6e3fa ("drm/amd/powerplay: PP/DAL interface changes for dynamic clock switch")
> Cc: stable@vger.kernel.org
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
> index f95c5f50eb0f..5273de3c5b98 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
> @@ -1033,6 +1033,7 @@ static int smu10_get_clock_by_type_with_latency(struct pp_hwmgr *hwmgr,
> break;
> case amd_pp_dpp_clock:
> pclk_vol_table = pinfo->vdd_dep_on_dppclk;
> + break;
> default:
> return -EINVAL;
> }
> --
> 2.20.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/powerplay: Fix missing break in switch
@ 2019-01-28 16:19 ` Alex Deucher
0 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2019-01-28 16:19 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: David (ChunMing) Zhou, Kees Cook, David Airlie, LKML,
Maling list - DRI developers, amd-gfx list, Daniel Vetter,
Alex Deucher, Evan Quan, Rex Zhu, Christian König
On Fri, Jan 25, 2019 at 5:31 PM Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:
>
> Add missing break statement in order to prevent the code from falling
> through to the default case.
>
> The resoning for this is that pclk_vol_table is an automatic variable.
> So, it makes no sense to update it just before falling through to the
> default case and return -EINVAL.
>
> This bug was found thanks to the ongoing efforts to enabling
> -Wimplicit-fallthrough.
>
> Fixes: cd70f3d6e3fa ("drm/amd/powerplay: PP/DAL interface changes for dynamic clock switch")
> Cc: stable@vger.kernel.org
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
> index f95c5f50eb0f..5273de3c5b98 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
> @@ -1033,6 +1033,7 @@ static int smu10_get_clock_by_type_with_latency(struct pp_hwmgr *hwmgr,
> break;
> case amd_pp_dpp_clock:
> pclk_vol_table = pinfo->vdd_dep_on_dppclk;
> + break;
> default:
> return -EINVAL;
> }
> --
> 2.20.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/powerplay: Fix missing break in switch
2019-01-28 16:19 ` Alex Deucher
(?)
@ 2019-01-28 18:23 ` Gustavo A. R. Silva
-1 siblings, 0 replies; 6+ messages in thread
From: Gustavo A. R. Silva @ 2019-01-28 18:23 UTC (permalink / raw)
To: Alex Deucher
Cc: Rex Zhu, Evan Quan, Alex Deucher, Christian König,
David (ChunMing) Zhou, David Airlie, Daniel Vetter, Kees Cook,
Maling list - DRI developers, amd-gfx list, LKML
On 1/28/19 10:19 AM, Alex Deucher wrote:
> On Fri, Jan 25, 2019 at 5:31 PM Gustavo A. R. Silva
> <gustavo@embeddedor.com> wrote:
>>
>> Add missing break statement in order to prevent the code from falling
>> through to the default case.
>>
>> The resoning for this is that pclk_vol_table is an automatic variable.
>> So, it makes no sense to update it just before falling through to the
>> default case and return -EINVAL.
>>
>> This bug was found thanks to the ongoing efforts to enabling
>> -Wimplicit-fallthrough.
>>
>> Fixes: cd70f3d6e3fa ("drm/amd/powerplay: PP/DAL interface changes for dynamic clock switch")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>
> Applied. Thanks!
>
Great. :)
Thanks, Alex.
--
Gustavo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/powerplay: Fix missing break in switch
2019-01-25 21:55 [PATCH] drm/amd/powerplay: Fix missing break in switch Gustavo A. R. Silva
2019-01-28 16:19 ` Alex Deucher
@ 2019-01-29 0:35 ` Sasha Levin
2019-01-29 0:35 ` Sasha Levin
2 siblings, 0 replies; 6+ messages in thread
From: Sasha Levin @ 2019-01-29 0:35 UTC (permalink / raw)
To: Sasha Levin, Gustavo A. R. Silva, Rex Zhu, Evan Quan
Cc: stable-u79uwXL29TY76Z2rM5mHXA,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit: cd70f3d6e3fa drm/amd/powerplay: PP/DAL interface changes for dynamic clock switch.
The bot has tested the following trees: v4.20.5, v4.19.18, v4.14.96.
v4.20.5: Build OK!
v4.19.18: Build OK!
v4.14.96: Failed to apply! Possible dependencies:
Unable to calculate
How should we proceed with this patch?
--
Thanks,
Sasha
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/powerplay: Fix missing break in switch
2019-01-25 21:55 [PATCH] drm/amd/powerplay: Fix missing break in switch Gustavo A. R. Silva
2019-01-28 16:19 ` Alex Deucher
2019-01-29 0:35 ` Sasha Levin
@ 2019-01-29 0:35 ` Sasha Levin
2 siblings, 0 replies; 6+ messages in thread
From: Sasha Levin @ 2019-01-29 0:35 UTC (permalink / raw)
To: Sasha Levin, Gustavo A. R. Silva, Rex Zhu, Evan Quan
Cc: stable, dri-devel, amd-gfx
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit: cd70f3d6e3fa drm/amd/powerplay: PP/DAL interface changes for dynamic clock switch.
The bot has tested the following trees: v4.20.5, v4.19.18, v4.14.96.
v4.20.5: Build OK!
v4.19.18: Build OK!
v4.14.96: Failed to apply! Possible dependencies:
Unable to calculate
How should we proceed with this patch?
--
Thanks,
Sasha
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-01-29 0:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-25 21:55 [PATCH] drm/amd/powerplay: Fix missing break in switch Gustavo A. R. Silva
2019-01-28 16:19 ` Alex Deucher
2019-01-28 16:19 ` Alex Deucher
2019-01-28 18:23 ` Gustavo A. R. Silva
2019-01-29 0:35 ` Sasha Levin
2019-01-29 0:35 ` Sasha Levin
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.