Skip to contentSkip to conversation

drm/amd/pm: Fix fall-through warning for Clang

PATCH Applied Gustavo A. R. Silva 2 participants 2 messages Jun 4, 2021

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

PATCH 1/1 drm/amd/pm: Fix fall-through warning for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.

---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 22 in linux-next. This is one of those last remaining warnings. :)

 drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c +1 -0
index 8f71f6a4bb49..43c3f6e755e7 100644
@@ -831,6 +831,7 @@ static int smu10_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,
 		break;
 	case AMD_DPM_FORCED_LEVEL_MANUAL:
 		data->fine_grain_enabled = 1;
+		break;
 	case AMD_DPM_FORCED_LEVEL_PROFILE_EXIT:
 	default:
 		break;
Signature · 1 line
2.27.0
Applied
#1 lore raw

Applied. Thanks!

Alex

Quoted 28 lines · Gustavo A. R. Silva

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.

---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 22 in linux-next. This is one of those last remaining warnings. :)

 drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c +1 -1
index 8f71f6a4bb49..43c3f6e755e7 100644
@@ -831,6 +831,7 @@ static int smu10_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,
                break;
        case AMD_DPM_FORCED_LEVEL_MANUAL:
                data->fine_grain_enabled = 1;
+               break;
        case AMD_DPM_FORCED_LEVEL_PROFILE_EXIT:
        default:
                break;
--
Quoted 2 lines

2.27.0

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