drm/amd/powerplay: Fix missing break in switch
Subsystems (2)
PATCH 1/1 drm/amd/powerplay: Fix missing break in switch
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.
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c +1 -0
@@ -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 ; }
Signature · 1 line
2.20.1
Alex Deucher
AppliedQuoted 8 lines · Gustavo A. R. Silva
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_tableis an automatic variable. So, it makes no sense to update it just before falling through to the default case and return-EINVAL.
Quoted 6 lines
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")Signed-off-by Gustavo A. R. Silva <[email protected]>
Applied. Thanks!
Alex
Quoted 19 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c +1
-1@@ -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
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Gustavo A. R. Silva
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_tableis an automatic variable. So, it makes no sense to update it just before falling through to the default case and return-EINVAL.
Quoted 9 lines
Quoted 6 lines
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")Signed-off-by Gustavo A. R. Silva <[email protected]>Applied. Thanks!
Great. :)
Thanks, Alex.
--
Gustavo
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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel