Skip to content

Commit 08ef8d3

Browse files
arndbvireshk
authored andcommitted
cpufreq: s3c244x: add fallthrough comments for switch
Apparently nobody has so far caught this warning, I hit it in randconfig build testing: drivers/cpufreq/s3c2440-cpufreq.c: In function 's3c2440_cpufreq_setdivs': drivers/cpufreq/s3c2440-cpufreq.c:175:10: error: this statement may fall through [-Werror=implicit-fallthrough=] camdiv |= S3C2440_CAMDIVN_HCLK3_HALF; ^ drivers/cpufreq/s3c2440-cpufreq.c:176:2: note: here case 3: ^~~~ drivers/cpufreq/s3c2440-cpufreq.c:181:10: error: this statement may fall through [-Werror=implicit-fallthrough=] camdiv |= S3C2440_CAMDIVN_HCLK4_HALF; ^ drivers/cpufreq/s3c2440-cpufreq.c:182:2: note: here case 4: ^~~~ Both look like the fallthrough is intentional, so add the new "fallthrough;" keyword. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
1 parent 45b2bb6 commit 08ef8d3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/cpufreq/s3c2440-cpufreq.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,14 @@ static void s3c2440_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
173173

174174
case 6:
175175
camdiv |= S3C2440_CAMDIVN_HCLK3_HALF;
176+
fallthrough;
176177
case 3:
177178
clkdiv |= S3C2440_CLKDIVN_HDIVN_3_6;
178179
break;
179180

180181
case 8:
181182
camdiv |= S3C2440_CAMDIVN_HCLK4_HALF;
183+
fallthrough;
182184
case 4:
183185
clkdiv |= S3C2440_CLKDIVN_HDIVN_4_8;
184186
break;

0 commit comments

Comments
 (0)