Skip to contentSkip to conversation

cpufreq: ti-cpufreq: Mark expected switch fall-through

PATCH Applied Gustavo A. R. Silva 2 participants 2 messages Jul 29, 2019 – Jul 30, 2019 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: ti-cpufreq: Mark expected switch fall-through

Mark switch cases where we are expecting to fall through.

This patch fixes the following warning (Building: arm):

drivers/cpufreq/ti-cpufreq.c: In function ‘dra7_efuse_xlate’:
drivers/cpufreq/ti-cpufreq.c:79:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
calculated_efuse |= DRA7_EFUSE_HIGH_MPU_OPP;
drivers/cpufreq/ti-cpufreq.c:80:2: note: here
case DRA7_EFUSE_HAS_OD_MPU_OPP:
^~~~

---
 drivers/cpufreq/ti-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/ti-cpufreq.c +1 -0
index 2ad1ae17932d..aeaa883a8c9d 100644
@@ -77,6 +77,7 @@ static unsigned long dra7_efuse_xlate(struct ti_cpufreq_data *opp_data,
 	case DRA7_EFUSE_HAS_ALL_MPU_OPP:
 	case DRA7_EFUSE_HAS_HIGH_MPU_OPP:
 		calculated_efuse |= DRA7_EFUSE_HIGH_MPU_OPP;
+		/* Fall through */
 	case DRA7_EFUSE_HAS_OD_MPU_OPP:
 		calculated_efuse |= DRA7_EFUSE_OD_MPU_OPP;
 	}
Signature · 1 line
2.22.0
maintainer Applied
#1 lore raw
Quoted 21 lines · Gustavo A. R. Silva

Mark switch cases where we are expecting to fall through.

This patch fixes the following warning (Building: arm):

drivers/cpufreq/ti-cpufreq.c: In function ‘dra7_efuse_xlate’:
drivers/cpufreq/ti-cpufreq.c:79:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
calculated_efuse |= DRA7_EFUSE_HIGH_MPU_OPP;
drivers/cpufreq/ti-cpufreq.c:80:2: note: here
case DRA7_EFUSE_HAS_OD_MPU_OPP:
^~~~

---
 drivers/cpufreq/ti-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/ti-cpufreq.c +0 -0
index 2ad1ae17932d..aeaa883a8c9d 100644

drivers/cpufreq/ti-cpufreq.c static unsigned long dra7_efuse_xlate(struct ti_cpufreq_data *opp_data, · line 83

Quoted 7 lines
drivers/cpufreq/ti-cpufreq.c +1 -0
@@ -77,6 +77,7 @@ static unsigned long dra7_efuse_xlate(struct ti_cpufreq_data *opp_data,
 	case DRA7_EFUSE_HAS_ALL_MPU_OPP:
 	case DRA7_EFUSE_HAS_HIGH_MPU_OPP:
 		calculated_efuse |= DRA7_EFUSE_HIGH_MPU_OPP;
+		/* Fall through */
 	case DRA7_EFUSE_HAS_OD_MPU_OPP:
 		calculated_efuse |= DRA7_EFUSE_OD_MPU_OPP;
 	}

Applied. Thanks.

Signature · 1 line
viresh