* [PATCH] drm/amdgpu/powerplay: Fix missing break in switch statement
@ 2019-03-01 21:29 Gustavo A. R. Silva
2019-03-01 23:54 ` Alex Deucher
2019-03-04 6:32 ` Huang Rui
0 siblings, 2 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2019-03-01 21:29 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 case SMU_Discrete_DpmTable.
This bug was found thanks to the ongoing efforts to enable
-Wimplicit-fallthrough.
Fixes: 34a564eaf528 ("drm/amd/powerplay: implement fw image related smum interface for Polaris.")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
index 52abca065764..222fb79d319e 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
@@ -2330,6 +2330,7 @@ static uint32_t polaris10_get_offsetof(uint32_t type, uint32_t member)
case DRAM_LOG_BUFF_SIZE:
return offsetof(SMU74_SoftRegisters, DRAM_LOG_BUFF_SIZE);
}
+ break;
case SMU_Discrete_DpmTable:
switch (member) {
case UvdBootLevel:
--
2.21.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amdgpu/powerplay: Fix missing break in switch statement
2019-03-01 21:29 [PATCH] drm/amdgpu/powerplay: Fix missing break in switch statement Gustavo A. R. Silva
@ 2019-03-01 23:54 ` Alex Deucher
2019-03-02 0:00 ` Gustavo A. R. Silva
2019-03-04 6:32 ` Huang Rui
1 sibling, 1 reply; 4+ messages in thread
From: Alex Deucher @ 2019-03-01 23:54 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, Mar 1, 2019 at 4:51 PM Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:
>
> Add missing break statement in order to prevent the code from falling
> through to case SMU_Discrete_DpmTable.
>
> This bug was found thanks to the ongoing efforts to enable
> -Wimplicit-fallthrough.
>
> Fixes: 34a564eaf528 ("drm/amd/powerplay: implement fw image related smum interface for Polaris.")
> Cc: stable@vger.kernel.org
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Already fixed:
https://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next-5.2-wip&id=6feaa4194c18578623565017f95d1b2f6b243567
Alex
> ---
> drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
> index 52abca065764..222fb79d319e 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
> @@ -2330,6 +2330,7 @@ static uint32_t polaris10_get_offsetof(uint32_t type, uint32_t member)
> case DRAM_LOG_BUFF_SIZE:
> return offsetof(SMU74_SoftRegisters, DRAM_LOG_BUFF_SIZE);
> }
> + break;
> case SMU_Discrete_DpmTable:
> switch (member) {
> case UvdBootLevel:
> --
> 2.21.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amdgpu/powerplay: Fix missing break in switch statement
2019-03-01 23:54 ` Alex Deucher
@ 2019-03-02 0:00 ` Gustavo A. R. Silva
0 siblings, 0 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2019-03-02 0:00 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 3/1/19 5:54 PM, Alex Deucher wrote:
> On Fri, Mar 1, 2019 at 4:51 PM Gustavo A. R. Silva
> <gustavo@embeddedor.com> wrote:
>>
>> Add missing break statement in order to prevent the code from falling
>> through to case SMU_Discrete_DpmTable.
>>
>> This bug was found thanks to the ongoing efforts to enable
>> -Wimplicit-fallthrough.
>>
>> Fixes: 34a564eaf528 ("drm/amd/powerplay: implement fw image related smum interface for Polaris.")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>
> Already fixed:
> https://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next-5.2-wip&id=6feaa4194c18578623565017f95d1b2f6b243567
>
Awesome. :)
I was looking for that link, but I didn't find it. That's why
I sent this patch.
Happy to see it is fixed now.
Thanks, Alex.
--
Gustavo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amdgpu/powerplay: Fix missing break in switch statement
2019-03-01 21:29 [PATCH] drm/amdgpu/powerplay: Fix missing break in switch statement Gustavo A. R. Silva
2019-03-01 23:54 ` Alex Deucher
@ 2019-03-04 6:32 ` Huang Rui
1 sibling, 0 replies; 4+ messages in thread
From: Huang Rui @ 2019-03-04 6:32 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,
dri-devel, amd-gfx, linux-kernel
On Fri, Mar 01, 2019 at 03:29:43PM -0600, Gustavo A. R. Silva wrote:
> Add missing break statement in order to prevent the code from falling
> through to case SMU_Discrete_DpmTable.
>
> This bug was found thanks to the ongoing efforts to enable
> -Wimplicit-fallthrough.
>
> Fixes: 34a564eaf528 ("drm/amd/powerplay: implement fw image related smum interface for Polaris.")
> Cc: stable@vger.kernel.org
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
> index 52abca065764..222fb79d319e 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
> @@ -2330,6 +2330,7 @@ static uint32_t polaris10_get_offsetof(uint32_t type, uint32_t member)
> case DRAM_LOG_BUFF_SIZE:
> return offsetof(SMU74_SoftRegisters, DRAM_LOG_BUFF_SIZE);
> }
> + break;
> case SMU_Discrete_DpmTable:
> switch (member) {
> case UvdBootLevel:
> --
> 2.21.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-03-04 6:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-01 21:29 [PATCH] drm/amdgpu/powerplay: Fix missing break in switch statement Gustavo A. R. Silva
2019-03-01 23:54 ` Alex Deucher
2019-03-02 0:00 ` Gustavo A. R. Silva
2019-03-04 6:32 ` Huang Rui
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).