Commit 1b0215a3 authored by Ying Zhang's avatar Ying Zhang Committed by Andrii Nakryiko

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: default avatarYing Zhang <yingzhang098@163.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Acked-by: default avatarYonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/bpf/20240521161702.4339-1-yingzhang098@163.com
parent f4aba347
...@@ -211,7 +211,7 @@ int bpf_prog1(struct cpu_args *ctx) ...@@ -211,7 +211,7 @@ int bpf_prog1(struct cpu_args *ctx)
SEC("tracepoint/power/cpu_frequency") SEC("tracepoint/power/cpu_frequency")
int bpf_prog2(struct cpu_args *ctx) 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; u32 key, cpu, pstate_idx;
u64 *val; u64 *val;
...@@ -232,7 +232,6 @@ int bpf_prog2(struct cpu_args *ctx) ...@@ -232,7 +232,6 @@ int bpf_prog2(struct cpu_args *ctx)
if (!cstate) if (!cstate)
return 0; return 0;
prev_state = *pstate;
*pstate = ctx->state; *pstate = ctx->state;
if (!*pts) { if (!*pts) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment