Skip to content

Commit

Permalink
bpf: Remove unused variable "prev_state"
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ying Zhang authored and Andrii Nakryiko committed May 21, 2024
1 parent f4aba34 commit 1b0215a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions samples/bpf/cpustat_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -232,7 +232,6 @@ int bpf_prog2(struct cpu_args *ctx)
if (!cstate)
return 0;

prev_state = *pstate;
*pstate = ctx->state;

if (!*pts) {
Expand Down

0 comments on commit 1b0215a

Please sign in to comment.