forked from torvalds/linux
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable -Wimplicit-fallthrough for Clang #115
Labels
[Build] Global flag
[Compiler difference] Clang
The kernel needs a fix to address a Clang-specific issue
compiler
Needs compiler support
[PATCH] Accepted
A submitted patch has been accepted upstream
[PATCH] Exists
A patch exists to address the issue
Comments
|
This patch is waiting for some test results from 0-day: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?h=testing/clang/fallthrough After applying the patch above to next-20201112, we have 134 warnings left: |
fengguang
pushed a commit
to 0day-ci/linux
that referenced
this issue
Nov 17, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly using the fallthrough pseudo-keyword as a replacement for a number of "fall through" markings. Notice that Clang doesn't recognize "fall through" comments as implicit fall-through. Link: KSPP#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
fengguang
pushed a commit
to 0day-ci/linux
that referenced
this issue
Nov 17, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: KSPP#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple fallthrough pseudo-keywords instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break and fallthrough statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break/goto statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple fallthrough pseudo-keyword macros, as a replacement for "fall through" comments. Notice that Clang doesn't recognize "falll through" comments as implicit fall-through. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple goto statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a break and a fallthrough statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break and a return statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a couple of break statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a couple of break statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly add multiple break/goto/return/fallthrough statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a couple of break statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a break and a goto statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements and replacing "FALLTHROUGH" comments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a couple of break and fallthrough statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a couple break statements and replacing "fall through" commments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
sudipm-mukherjee
pushed a commit
to sudipm-mukherjee/linux-test
that referenced
this issue
Nov 18, 2020
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
jgudec
pushed a commit
to jgudec/android_kernel_samsung_exynos2200
that referenced
this issue
Jul 4, 2023
[ Upstream commit 28073eb09c5aa29e879490edb88cfd3e7073821e ] In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com> Stable-dep-of: c7423dbdbc9e ("ima: Handle -ESTALE returned by ima_filter_rule_match()") Signed-off-by: Sasha Levin <sashal@kernel.org>
z3zens
pushed a commit
to AOSPA-X01BD/kernel_msm-4.19
that referenced
this issue
Jul 8, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough; statement. Notice that this seems to be a Duff device for performance[1]. So, although the code looks a bit _funny_, I didn't want to refactor or modify it beyond merely adding a fallthrough marking, which might be the least disruptive way to fix this issue. [1] https://www.drdobbs.com/a-reusable-duff-device/184406208 Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com> Change-Id: I088e092e4ec708de32b316388db282483d966d0b Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
z3zens
pushed a commit
to AOSPA-X01BD/kernel_msm-4.19
that referenced
this issue
Jul 8, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough; statement. Notice that this seems to be a Duff device for performance[1]. So, although the code looks a bit _funny_, I didn't want to refactor or modify it beyond merely adding a fallthrough marking, which might be the least disruptive way to fix this issue. [1] https://www.drdobbs.com/a-reusable-duff-device/184406208 Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com> Change-Id: I088e092e4ec708de32b316388db282483d966d0b Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
Rohail33
pushed a commit
to Rohail33/Realking_xiaomi_xaga
that referenced
this issue
Jul 11, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Rohail33
pushed a commit
to Rohail33/Realking_xiaomi_xaga
that referenced
this issue
Jul 11, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
ferstar
pushed a commit
to ferstar/xiaomi_xaga_kernel
that referenced
this issue
Jul 12, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Rohail33
pushed a commit
to Rohail33/Realking_xiaomi_xaga
that referenced
this issue
Jul 14, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Rohail33
pushed a commit
to Rohail33/Realking_xiaomi_xaga
that referenced
this issue
Jul 18, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Rohail33
pushed a commit
to Rohail33/Realking_xiaomi_xaga
that referenced
this issue
Jul 18, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Santhanabalan
pushed a commit
to Santhanabalan/kernel_xiaomi_sm8350
that referenced
this issue
Jul 21, 2023
[ Upstream commit 28073eb09c5aa29e879490edb88cfd3e7073821e ] In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com> Stable-dep-of: c7423dbdbc9e ("ima: Handle -ESTALE returned by ima_filter_rule_match()") Signed-off-by: Sasha Levin <sashal@kernel.org>
diphons
pushed a commit
to diphons/D8G_Kernel_oxygen
that referenced
this issue
Jul 22, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough; statement. Notice that this seems to be a Duff device for performance[1]. So, although the code looks a bit _funny_, I didn't want to refactor or modify it beyond merely adding a fallthrough marking, which might be the least disruptive way to fix this issue. [1] https://www.drdobbs.com/a-reusable-duff-device/184406208 Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com> Change-Id: I088e092e4ec708de32b316388db282483d966d0b Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
diphons
pushed a commit
to diphons/D8G_Kernel_oxygen
that referenced
this issue
Jul 22, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough; statement. Notice that this seems to be a Duff device for performance[1]. So, although the code looks a bit _funny_, I didn't want to refactor or modify it beyond merely adding a fallthrough marking, which might be the least disruptive way to fix this issue. [1] https://www.drdobbs.com/a-reusable-duff-device/184406208 Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com> Change-Id: I088e092e4ec708de32b316388db282483d966d0b Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
candyceline
pushed a commit
to Danda420/kernel_xiaomi_sm8250
that referenced
this issue
Jul 23, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough; statement. Notice that this seems to be a Duff device for performance[1]. So, although the code looks a bit _funny_, I didn't want to refactor or modify it beyond merely adding a fallthrough marking, which might be the least disruptive way to fix this issue. [1] https://www.drdobbs.com/a-reusable-duff-device/184406208 Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com> Change-Id: I088e092e4ec708de32b316388db282483d966d0b Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
Rohail33
pushed a commit
to Rohail33/Realking_xiaomi_xaga
that referenced
this issue
Jul 23, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
v4lkyr
pushed a commit
to v4lkyr/kernel_rmx3560
that referenced
this issue
Jul 25, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: v4lkyr <valkyr23@gmail.com>
v4lkyr
pushed a commit
to v4lkyr/kernel_rmx3560
that referenced
this issue
Jul 27, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: v4lkyr <valkyr23@gmail.com>
Reinazhard
pushed a commit
to Reinazhard/android_kernel_xiaomi_whyred
that referenced
this issue
Jul 29, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough; statement. Notice that this seems to be a Duff device for performance[1]. So, although the code looks a bit _funny_, I didn't want to refactor or modify it beyond merely adding a fallthrough marking, which might be the least disruptive way to fix this issue. [1] https://www.drdobbs.com/a-reusable-duff-device/184406208 Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com> Change-Id: I088e092e4ec708de32b316388db282483d966d0b Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
priiii1808
pushed a commit
to priiii1808/soul_kernel_xiaomi_xaga
that referenced
this issue
Jul 30, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: v4lkyr <valkyr23@gmail.com> Signed-off-by: priiii1808 <priyanshusinghal0818@gmail.com>
priiii1808
pushed a commit
to priiii1808/soul_kernel_xiaomi_xaga
that referenced
this issue
Jul 30, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: priiii1808 <priyanshusinghal0818@gmail.com>
priiii1808
pushed a commit
to priiii1808/soul_kernel_xiaomi_xaga
that referenced
this issue
Jul 30, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: priiii1808 <priyanshusinghal0818@gmail.com>
priiii1808
pushed a commit
to priiii1808/soul_kernel_xiaomi_xaga
that referenced
this issue
Jul 30, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: priiii1808 <priyanshusinghal0818@gmail.com>
Rohail33
pushed a commit
to Rohail33/Realking_xiaomi_xaga
that referenced
this issue
Aug 3, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Rohail33
pushed a commit
to Rohail33/Realking_xiaomi_xaga
that referenced
this issue
Aug 3, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
v4lkyr
pushed a commit
to v4lkyr/kernel_rmx3560
that referenced
this issue
Aug 6, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: v4lkyr <valkyr23@gmail.com>
github-actions bot
pushed a commit
to sirdarckcat/linux-1
that referenced
this issue
Aug 11, 2023
[ Upstream commit e689b30 ] In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: KSPP/linux#115 Signed-off-by: Li Huafei <lihuafei1@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
github-actions bot
pushed a commit
to sirdarckcat/linux-1
that referenced
this issue
Aug 11, 2023
[ Upstream commit f12758f ] In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by replacing a /* fall through */ comment with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case. Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name> Stable-dep-of: 421033d ("wifi: mt76: mt7615: do not advertise 5 GHz on first phy of MT7615D (DBDC)") Signed-off-by: Sasha Levin <sashal@kernel.org>
v4lkyr
pushed a commit
to v4lkyr/kernel_rmx3560
that referenced
this issue
Aug 11, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: v4lkyr <valkyr23@gmail.com>
wanghao75
pushed a commit
to openeuler-mirror/kernel
that referenced
this issue
Aug 14, 2023
stable inclusion from stable-v5.10.163 commit d5b227f0d28d629f6782b0dda091fd78fbcfbb1f category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7PJ9N Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d5b227f0d28d629f6782b0dda091fd78fbcfbb1f ---------------------------------------------------- [ Upstream commit 28073eb ] In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com> Stable-dep-of: c7423db ("ima: Handle -ESTALE returned by ima_filter_rule_match()") Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: zhaoxiaoqiang11 <zhaoxiaoqiang11@jd.com> Conflicts: security/integrity/ima/ima_policy.c
diphons
pushed a commit
to diphons/D8G_Kernel_oxygen
that referenced
this issue
Aug 20, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough; statement. Notice that this seems to be a Duff device for performance[1]. So, although the code looks a bit _funny_, I didn't want to refactor or modify it beyond merely adding a fallthrough marking, which might be the least disruptive way to fix this issue. [1] https://www.drdobbs.com/a-reusable-duff-device/184406208 Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com> Change-Id: I088e092e4ec708de32b316388db282483d966d0b Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
roynatech2544
pushed a commit
to Lenovo-SM6225-Fork/kernel_lenovo_tb128fu
that referenced
this issue
Aug 20, 2023
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough; statement. Notice that this seems to be a Duff device for performance[1]. So, although the code looks a bit _funny_, I didn't want to refactor or modify it beyond merely adding a fallthrough marking, which might be the least disruptive way to fix this issue. [1] https://www.drdobbs.com/a-reusable-duff-device/184406208 Link: KSPP/linux#115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com> Change-Id: I088e092e4ec708de32b316388db282483d966d0b Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Build] Global flag
[Compiler difference] Clang
The kernel needs a fix to address a Clang-specific issue
compiler
Needs compiler support
[PATCH] Accepted
A submitted patch has been accepted upstream
[PATCH] Exists
A patch exists to address the issue
Fix all fall-through warnings in order to enable -Wimplicit-fallthrough for Clang.
In preparation to enable -Wimplicit-fallthrough for Clang, explicitly
add multiple break/goto/return/fallthrough statements instead of letting
the code fall through to the next case.
Notice that in order to enable -Wimplicit-fallthrough for Clang, this change[1]
is meant to be reverted at some point.
Something important to mention is that there is currently a discrepancy
between GCC and Clang when dealing with switch fall-through to empty case
statements or to cases that only contain a break/continue/return
statement[2][3][4].
Now that the -Wimplicit-fallthrough option has been globally enabled[5],
any compiler should really warn on missing either a fallthrough annotation
or any of the other case-terminating statements (break/continue/return/
goto) when falling through to the next case statement. Making exceptions
to this introduces variation in case handling which may continue to lead
to bugs, misunderstandings, and a general lack of robustness. The point
of enabling options like -Wimplicit-fallthrough is to prevent human error
and aid developers in spotting bugs before their code is even built/
submitted/committed, therefore eliminating classes of bugs. So, in order
to really accomplish this, we should, and can, move in the direction of
addressing any error-prone scenarios and get rid of the unintentional
fallthrough bug-class in the kernel, entirely, even if there is some minor
redundancy. Better to have explicit case-ending statements than continue to
have exceptions where one must guess as to the right result. The compiler
will eliminate any actual redundancy.
[1] commit e2079e9 ("kbuild: Do not enable -Wimplicit-fallthrough for clang for now")
[2] ClangBuiltLinux#636
[3] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91432
[4] https://godbolt.org/z/xgkvIh
[5] commit a035d55 ("Makefile: Globally enable fall-through warning")
The following patch (already in mainline 5.10-rc2 :) ) addresses almost 40,000 fall-through warnings:
include: jhash/signal: Fix fall-through warnings for Clang
There are currently 440 of these warnings remaining in next-20201102:
The text was updated successfully, but these errors were encountered: