summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorYing Zhang <yingzhang098@163.com>2024-05-21 18:17:02 +0200
committerAndrii Nakryiko <andrii@kernel.org>2024-05-21 19:48:19 +0200
commit1b0215a3633a4c54ed7ec3af93e7a782dda8d965 (patch)
tree301d934b4eb09ab3c45b71e446dab2b2f7ecaa42 /samples
parentbpftool: Un-const bpf_func_info to fix it for llvm 17 and newer (diff)
downloadlinux-1b0215a3633a4c54ed7ec3af93e7a782dda8d965.tar.xz
linux-1b0215a3633a4c54ed7ec3af93e7a782dda8d965.zip
bpf: Remove unused variable "prev_state"
The variable "prev_state" is not used for any actual operations v2: Fix commit message and description. Signed-off-by: Ying Zhang <yingzhang098@163.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/bpf/20240521161702.4339-1-yingzhang098@163.com
Diffstat (limited to 'samples')
-rw-r--r--samples/bpf/cpustat_kern.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/samples/bpf/cpustat_kern.c b/samples/bpf/cpustat_kern.c
index 944f13fe164a..7ec7143e2757 100644
--- a/samples/bpf/cpustat_kern.c
+++ b/samples/bpf/cpustat_kern.c
@@ -211,7 +211,7 @@ int bpf_prog1(struct cpu_args *ctx)
SEC("tracepoint/power/cpu_frequency")
int bpf_prog2(struct cpu_args *ctx)
{
- u64 *pts, *cstate, *pstate, prev_state, cur_ts, delta;
+ u64 *pts, *cstate, *pstate, cur_ts, delta;
u32 key, cpu, pstate_idx;
u64 *val;
@@ -232,7 +232,6 @@ int bpf_prog2(struct cpu_args *ctx)
if (!cstate)
return 0;
- prev_state = *pstate;
*pstate = ctx->state;
if (!*pts) {