Skip to contentSkip to conversation

drm/amdgpu/powerplay: add missing breaks in polaris10_smumgr

PATCH In review Alex Deucher 2 participants 3 messages Feb 18, 2019 – Feb 21, 2019 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/powerplay: add missing breaks in polaris10_smumgr

This was noticed by Gustavo and his -Wimplicit-fallthrough patches. However, in this case, I believe we should have breaks rather than falling though, that said, in practice we should never fall through in the first place so there should be no change in behavior.

---
 drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +2 -0
index 52abca065764..2d4cfe14f72e 100644
@@ -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:
@@ -2339,6 +2340,7 @@ static uint32_t polaris10_get_offsetof(uint32_t type, uint32_t member)
 		case LowSclkInterruptThreshold:
 			return offsetof(SMU74_Discrete_DpmTable, LowSclkInterruptThreshold);
 		}
+		break;
 	}
 	pr_warn("can't get the offset of type %x member %x\n", type, member);
 	return 0;
Signature · 6 lines
2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20190218223546.12581-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Ping?

Alex

Quoted 33 lines · Alex Deucher

This was noticed by Gustavo and his -Wimplicit-fallthrough patches. However, in this case, I believe we should have breaks rather than falling though, that said, in practice we should never fall through in the first place so there should be no change in behavior.

---
 drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +2 -1
index 52abca065764..2d4cfe14f72e 100644
@@ -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:
@@ -2339,6 +2340,7 @@ static uint32_t polaris10_get_offsetof(uint32_t type, uint32_t member)
                case LowSclkInterruptThreshold:
                        return offsetof(SMU74_Discrete_DpmTable, LowSclkInterruptThreshold);
                }
+               break;
        }
        pr_warn("can't get the offset of type %x member %x\n", type, member);
        return 0;
--
Quoted 2 lines

2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): CADnq5_NqCJExqxhxPFLnX+PniE0hjHHOSEkJdReSi7Sm8XSKGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

Reviewed-by Evan Quan
#4 lore raw
Quoted 51 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2019年2月21日 11:01
To: amd-gfx list <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdgpu/powerplay: add missing breaks in polaris10_smumgr

Ping?

Alex

drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c static uint32_t polaris10_get_offsetof(uint32_t

Quoted 17 lines · Alex Deucher

This was noticed by Gustavo and his -Wimplicit-fallthrough patches. However, in this case, I believe we should have breaks rather than falling though, that said, in practice we should never fall through in the first place so there should be no change in behavior.

---
 drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +0 -0
index 52abca065764..2d4cfe14f72e 100644
@@ -2330,6 +2330,7 @@ static uint32_t polaris10_get_offsetof(uint32_t

type, uint32_t member)

drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c static uint32_t polaris10_get_offsetof(uint32_t · line 2331

Quoted 2 lines
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +0 -0
                case DRAM_LOG_BUFF_SIZE:
                        return offsetof(SMU74_SoftRegisters,

DRAM_LOG_BUFF_SIZE);

drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c static uint32_t polaris10_get_offsetof(uint32_t

Quoted 6 lines
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +1 -0
                }
+               break;
        case SMU_Discrete_DpmTable:
                switch (member) {
                case UvdBootLevel:
@@ -2339,6 +2340,7 @@ static uint32_t polaris10_get_offsetof(uint32_t

type, uint32_t member)

drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c static uint32_t polaris10_get_offsetof(uint32_t · line 2341

Quoted 2 lines
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +0 -0
                case LowSclkInterruptThreshold:
                        return offsetof(SMU74_Discrete_DpmTable,

LowSclkInterruptThreshold);

drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c static uint32_t polaris10_get_offsetof(uint32_t type, uint32_t member)

Quoted 4 lines
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +1 -0
                }
+               break;
        }
        pr_warn("can't get the offset of type %x member %x\n", type,

member);

Quoted 8 lines
Quoted 4 lines
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +0 -1
        return 0;
--

2.20.1

_______________________________________________
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