* [PATCH] bpf: remove redundant assignment of variable id
@ 2021-03-26 19:43 Colin King
2021-03-26 20:18 ` Song Liu
2021-03-30 21:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Colin King @ 2021-03-26 19:43 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, netdev, bpf
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable id is being assigned a value that is never
read, the assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
kernel/bpf/btf.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 369faeddf1df..b22fb29347c0 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] bpf: remove redundant assignment of variable id
2021-03-26 19:43 [PATCH] bpf: remove redundant assignment of variable id Colin King
@ 2021-03-26 20:18 ` Song Liu
2021-03-29 5:55 ` Dan Carpenter
2021-03-30 21:10 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Song Liu @ 2021-03-26 20:18 UTC (permalink / raw)
To: Colin King
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Networking, bpf, kernel-janitors, open list
On Fri, Mar 26, 2021 at 12:45 PM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable id is being assigned a value that is never
> read, the assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Song Liu <songliubraving@fb.com>
For future patches, please prefix it as [PATCH bpf-next] for
[PATCH bpf], based on which tree the patch should apply to.
> ---
> kernel/bpf/btf.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
> index 369faeddf1df..b22fb29347c0 100644
> --- a/kernel/bpf/btf.c
> +++ b/kernel/bpf/btf.c
> @@ -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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bpf: remove redundant assignment of variable id
2021-03-26 20:18 ` Song Liu
@ 2021-03-29 5:55 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2021-03-29 5:55 UTC (permalink / raw)
To: Song Liu
Cc: Colin King, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Networking, bpf, kernel-janitors, open list
On Fri, Mar 26, 2021 at 01:18:36PM -0700, Song Liu wrote:
> On Fri, Mar 26, 2021 at 12:45 PM Colin King <colin.king@canonical.com> wrote:
> >
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > The variable id is being assigned a value that is never
> > read, the assignment is redundant and can be removed.
> >
> > Addresses-Coverity: ("Unused value")
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
>
> Acked-by: Song Liu <songliubraving@fb.com>
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bpf: remove redundant assignment of variable id
2021-03-26 19:43 [PATCH] bpf: remove redundant assignment of variable id Colin King
2021-03-26 20:18 ` Song Liu
@ 2021-03-30 21:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-30 21:10 UTC (permalink / raw)
To: Colin Ian King
Cc: ast, daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
kpsingh, netdev, bpf, kernel-janitors, linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
On Fri, 26 Mar 2021 19:43:48 +0000 you wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable id is being assigned a value that is never
> read, the assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>
> [...]
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-30 21:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26 19:43 [PATCH] bpf: remove redundant assignment of variable id Colin King
2021-03-26 20:18 ` Song Liu
2021-03-29 5:55 ` Dan Carpenter
2021-03-30 21:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).