bpf: remove redundant assignment to pointer t
Subsystems (4)
PATCH 1/1 bpf: remove redundant assignment to pointer t
The pointer t is being initialized with a value that is never read. The pointer is re-assigned a value a littler later on, hence the initialization is redundant and can be removed.
Signed-off-by Colin Ian King <[email protected]>
--- kernel/bpf/btf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/btf.c +1 -1
@@ -836,7 +836,7 @@ static const char *btf_show_name(struct btf_show *show)const char *ptr_suffix = &ptr_suffixes[strlen (ptr_suffixes)];const char *name =NULL , *prefix ="" , *parens ="" ;const struct btf_member *m = show->state.member; -const struct btf_type *t = show->state.type; +const struct btf_type *t;const struct btf_array *array;u32 id = show->state.type_id;const char *member =NULL ;
Signature · 1 line
2.33.1
This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:
Hello:
This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:
Quoted 8 lines · On Tue, 7 Dec 2021 22:47:18 +0000 you wrote:
The pointer t is being initialized with a value that is never read. The pointer is re-assigned a value a littler later on, hence the initialization is redundant and can be removed.
Signed-off-by Colin Ian King <[email protected]>--- kernel/bpf/btf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- bpf: remove redundant assignment to pointer t
https://git.kernel.org/bpf/bpf-next/c/73b6eae583f4
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html