libbpf: Remove unnecessary type cast
Subsystems (4)
PATCH 1/1 libbpf: Remove unnecessary type cast
The link variable is already of type 'struct bpf_link *', casting it to 'struct bpf_link *' is redundant, drop it.
Signed-off-by Yuntao Wang <[email protected]>
--- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/bpf/libbpf.c +1 -1
@@ -11270,7 +11270,7 @@ static struct bpf_link *bpf_program__attach_btf_id(const struct bpf_program *proreturn libbpf_err_ptr (pfd); } link->fd = pfd; -return (struct bpf_link *)link; +return link; }struct bpf_link *bpf_program__attach_trace (const struct bpf_program *prog)
Signature · 1 line
2.35.3
This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann <[email protected]>:
Hello:
This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann <[email protected]>:
Quoted 7 lines · On Sun, 24 Apr 2022 22:34:20 +0800 you wrote:
The link variable is already of type 'struct
bpf_link*', casting it to 'structbpf_link*' is redundant, drop it.Signed-off-by Yuntao Wang <[email protected]>--- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [bpf-next] libbpf: Remove unnecessary type cast
https://git.kernel.org/bpf/bpf-next/c/003fed595c0f
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html