* [PATCH] drm/amdgpu/powerplay/polaris10_smumgr: Mark expected switch fall-through
@ 2019-02-15 17:02 Gustavo A. R. Silva
2019-02-18 22:40 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-15 17:02 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
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.
Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.
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..92de1bbb2e33 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);
}
+ /* fall through */
case SMU_Discrete_DpmTable:
switch (member) {
case UvdBootLevel:
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu/powerplay/polaris10_smumgr: Mark expected switch fall-through
2019-02-15 17:02 [PATCH] drm/amdgpu/powerplay/polaris10_smumgr: Mark expected switch fall-through Gustavo A. R. Silva
@ 2019-02-18 22:40 ` Alex Deucher
2019-02-18 22:48 ` Gustavo A. R. Silva
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2019-02-18 22:40 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, Feb 15, 2019 at 1:50 PM Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
>
> Warning level 3 was used: -Wimplicit-fallthrough=3
>
> This patch is part of the ongoing efforts to enable
> -Wimplicit-fallthrough.
>
> 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..92de1bbb2e33 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);
> }
> + /* fall through */
These should be breaks, although I don't think we ever currently hit
this case. I've sent out a patch to fix it and applied the rest of
the radeon and amdgpu patches. Thanks!
Alex
> case SMU_Discrete_DpmTable:
> switch (member) {
> case UvdBootLevel:
> --
> 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] 3+ messages in thread
* Re: [PATCH] drm/amdgpu/powerplay/polaris10_smumgr: Mark expected switch fall-through
2019-02-18 22:40 ` Alex Deucher
@ 2019-02-18 22:48 ` Gustavo A. R. Silva
0 siblings, 0 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-18 22:48 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 2/18/19 4:40 PM, Alex Deucher wrote:
> On Fri, Feb 15, 2019 at 1:50 PM Gustavo A. R. Silva
> <gustavo@embeddedor.com> wrote:
>>
>> In preparation to enabling -Wimplicit-fallthrough, mark switch
>> cases where we are expecting to fall through.
>>
>> Warning level 3 was used: -Wimplicit-fallthrough=3
>>
>> This patch is part of the ongoing efforts to enable
>> -Wimplicit-fallthrough.
>>
>> 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..92de1bbb2e33 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);
>> }
>> + /* fall through */
>
> These should be breaks, although I don't think we ever currently hit
> this case. I've sent out a patch to fix it and applied the rest of
> the radeon and amdgpu patches. Thanks!
>
Awesome!
Thanks, Alex.
--
Gustavo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-18 22:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-15 17:02 [PATCH] drm/amdgpu/powerplay/polaris10_smumgr: Mark expected switch fall-through Gustavo A. R. Silva
2019-02-18 22:40 ` Alex Deucher
2019-02-18 22:48 ` 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).