[PATCH] tools/bpf: remove unused variable

Zhu Jun posted 1 patch 1 year, 5 months ago
tools/bpf/runqslower/runqslower.bpf.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] tools/bpf: remove unused variable
Posted by Zhu Jun 1 year, 5 months ago
The variable is never referenced in the code, just remove them.

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
---
 tools/bpf/runqslower/runqslower.bpf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/bpf/runqslower/runqslower.bpf.c b/tools/bpf/runqslower/runqslower.bpf.c
index 9a5c1f008fe6..fced54a3adf6 100644
--- a/tools/bpf/runqslower/runqslower.bpf.c
+++ b/tools/bpf/runqslower/runqslower.bpf.c
@@ -70,7 +70,6 @@ int handle__sched_switch(u64 *ctx)
 	struct task_struct *next = (struct task_struct *)ctx[2];
 	struct runq_event event = {};
 	u64 *tsp, delta_us;
-	long state;
 	u32 pid;
 
 	/* ivcsw: treat like an enqueue event and store timestamp */
-- 
2.17.1
Re: [PATCH] tools/bpf: remove unused variable
Posted by Yonghong Song 1 year, 5 months ago
On 8/19/24 10:51 PM, Zhu Jun wrote:
> The variable is never referenced in the code, just remove them.
>
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>

Acked-by: Yonghong Song <yonghong.song@linux.dev>