Skip to contentSkip to conversation

arm_pmu: mark expected switch fall-through

PATCH New Matteo Croce 1 participant 1 message Jul 28, 2019 Arm PMU profiling and debugging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm_pmu: mark expected switch fall-through

Mark switch cases where we are expecting to fall through, fixes the following warning:

drivers/perf/arm_pmu.c: In function ‘cpu_pm_pmu_notify’:
drivers/perf/arm_pmu.c:726:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
cpu_pm_pmu_setup(armpmu, cmd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/arm_pmu.c:727:2: note: here
case CPU_PM_ENTER_FAILED:
^~~~

---
 drivers/perf/arm_pmu.c | 1 +
 1 file changed, 1 insertion(+)
drivers/perf/arm_pmu.c +1 -0
index 2d06b8095a19..3eb711066a22 100644
@@ -724,6 +724,7 @@ static int cpu_pm_pmu_notify(struct notifier_block *b, unsigned long cmd,
 		break;
 	case CPU_PM_EXIT:
 		cpu_pm_pmu_setup(armpmu, cmd);
+		/* fallthrough */
 	case CPU_PM_ENTER_FAILED:
 		armpmu->start(armpmu);
 		break;
Signature · 1 line
2.21.0