Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <arnd@arndb.de>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

authored by

Arnd Bergmann and committed by
Viresh Kumar
08ef8d35 45b2bb66

+2
+2
drivers/cpufreq/s3c2440-cpufreq.c
··· 173 173 174 174 case 6: 175 175 camdiv |= S3C2440_CAMDIVN_HCLK3_HALF; 176 + fallthrough; 176 177 case 3: 177 178 clkdiv |= S3C2440_CLKDIVN_HDIVN_3_6; 178 179 break; 179 180 180 181 case 8: 181 182 camdiv |= S3C2440_CAMDIVN_HCLK4_HALF; 183 + fallthrough; 182 184 case 4: 183 185 clkdiv |= S3C2440_CLKDIVN_HDIVN_4_8; 184 186 break;