Skip to contentSkip to conversation

powerpc: net: bpf_jit_comp: Fix misuse of fallthrough

PATCH Applied [email protected] 3 participants 3 messages Sep 28, 2020 – Sep 29, 2020

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: net: bpf_jit_comp: Fix misuse of fallthrough

From: He Zhe <[email protected]>

The user defined label following "fallthrough" is not considered by GCC and causes build failure.

kernel-source/include/linux/compiler_attributes.h:208:41: error: attribute 'fallthrough' not preceding a case label or default label [-Werror]
208 define fallthrough _attribute((fallthrough_))

                          ^~~~~~~~~~~~~
---
 arch/powerpc/net/bpf_jit_comp.c | 1 -
 1 file changed, 1 deletion(-)
arch/powerpc/net/bpf_jit_comp.c +0 -1
index 78d61f97371e..e809cb5a1631 100644
@@ -475,7 +475,6 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
 		case BPF_JMP | BPF_JSET | BPF_K:
 		case BPF_JMP | BPF_JSET | BPF_X:
 			true_cond = COND_NE;
-			fallthrough;
 		cond_branch:
 			/* same targets, can avoid doing the test :) */
 			if (filter[i].jt == filter[i].jf) {
Signature · 1 line
2.26.2
maintainer Applied
#1 lore raw
Quoted 11 lines · On 9/28/20 11:00 AM, [email protected] wrote:

From: He Zhe <[email protected]>

The user defined label following "fallthrough" is not considered by GCC and causes build failure.

kernel-source/include/linux/compiler_attributes.h:208:41: error: attribute 'fallthrough' not preceding a case label or default label [-Werror]
208 define fallthrough _attribute((fallthrough_))

                           ^~~~~~~~~~~~~

Applied, thanks! I've also added Fixes tag with df561f6688fe ("treewide: Use fallthrough pseudo-keyword") which added the bug.

#2 lore raw
In reply to [email protected]
This patch was applied to bpf/bpf.git (refs/heads/master):

Hello:

This patch was applied to bpf/bpf.git (refs/heads/master):

Quoted 11 lines · On Mon, 28 Sep 2020 17:00:23 +0800 you wrote:

From: He Zhe <[email protected]>

The user defined label following "fallthrough" is not considered by GCC and causes build failure.

kernel-source/include/linux/compiler_attributes.h:208:41: error: attribute 'fallthrough' not preceding a case label or default label [-Werror]
208 define fallthrough _attribute((fallthrough_))

                          ^~~~~~~~~~~~~

[...]

Here is the summary with links:
- powerpc: net: bpf_jit_comp: Fix misuse of fallthrough

    https://git.kernel.org/bpf/bpf/c/9cf51446e686

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html