Skip to contentSkip to conversation

bpf: remove redundant assignment of variable id

PATCH Applied Colin King 4 participants 4 messages Mar 26, 2021 – Mar 30, 2021

Subsystems (4)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 bpf: remove redundant assignment of variable id

From: Colin Ian King <[email protected]>

The variable id is being assigned a value that is never read, the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 kernel/bpf/btf.c | 1 -
 1 file changed, 1 deletion(-)
kernel/bpf/btf.c +0 -1
index 369faeddf1df..b22fb29347c0 100644
@@ -789,7 +789,6 @@ static const struct btf_type *btf_type_skip_qualifiers(const struct btf *btf,
 
 	while (btf_type_is_modifier(t) &&
 	       BTF_INFO_KIND(t->info) != BTF_KIND_TYPEDEF) {
-		id = t->type;
 		t = btf_type_by_id(btf, t->type);
 	}
 
Signature · 1 line
2.30.2
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Colin King

From: Colin Ian King <[email protected]>

The variable id is being assigned a value that is never read, the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

For future patches, please prefix it as [PATCH bpf-next] for [PATCH bpf], based on which tree the patch should apply to.

Quoted 19 lines
---
 kernel/bpf/btf.c | 1 -
 1 file changed, 1 deletion(-)
kernel/bpf/btf.c +0 -2
index 369faeddf1df..b22fb29347c0 100644
@@ -789,7 +789,6 @@ static const struct btf_type *btf_type_skip_qualifiers(const struct btf *btf,
 
        while (btf_type_is_modifier(t) &&
               BTF_INFO_KIND(t->info) != BTF_KIND_TYPEDEF) {
-               id = t->type;
                t = btf_type_by_id(btf, t->type);
        }
 
--

2.30.2

#2 lore raw
Quoted 7 lines · Song Liu
Quoted 6 lines · Colin King

From: Colin Ian King <[email protected]>

The variable id is being assigned a value that is never read, the assignment is redundant and can be removed.

Quoted 8 lines
Quoted 2 lines

Addresses-Coverity: ("Unused value")

For future patches, please prefix it as [PATCH bpf-next] for [PATCH bpf], based on which tree the patch should apply to.

You can keep asking us to do that but it's never going to happen... :P I do this for networking but it's a massive pain in the butt and I get it wrong 20% of the time.

regards,
dan carpenter

#3 lore raw
In reply to Colin King
This patch was applied to bpf/bpf-next.git (refs/heads/master):

Hello:

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

Quoted 9 lines · On Fri, 26 Mar 2021 19:43:48 +0000 you wrote:

From: Colin Ian King <[email protected]>

The variable id is being assigned a value that is never read, the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

[...]

Here is the summary with links:
- bpf: remove redundant assignment of variable id

    https://git.kernel.org/bpf/bpf-next/c/235fc0e36d35

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