Thread (3 messages) 3 messages, 3 authors, 2021-10-04

Re: [PATCH] cpufreq: s3c244x: add fallthrough comments for switch

From: Krzysztof Kozlowski <hidden>
Date: 2021-09-27 09:56:05
Also in: linux-arm-kernel, linux-samsung-soc, lkml

On 27/09/2021 11:51, Arnd Bergmann wrote:
From: Arnd Bergmann <arnd@arndb.de>

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>
---
 drivers/cpufreq/s3c2440-cpufreq.c | 2 ++
 1 file changed, 2 insertions(+)
I think I saw it but back then implicit-fallthrough was not an error :)

LGTM:

Acked-by: Krzysztof Kozlowski <redacted>


Best regards,
Krzysztof
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help