diff mbox series

[bpf-next,v2] bpf: Remove unused variable "prev_state"

Message ID 20240521161702.4339-1-yingzhang098@163.com (mailing list archive)
State Accepted
Commit 1b0215a3633a4c54ed7ec3af93e7a782dda8d965
Delegated to: BPF
Headers show
Series [bpf-next,v2] bpf: Remove unused variable "prev_state" | expand

Commit Message

zhangying May 21, 2024, 4:17 p.m. UTC
From: Ying Zhang <yingzhang098@163.com>

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>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
---
 samples/bpf/cpustat_kern.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org May 21, 2024, 5:50 p.m. UTC | #1
Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Tue, 21 May 2024 16:17:02 +0000 you wrote:
> From: Ying Zhang <yingzhang098@163.com>
> 
> 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>
> Acked-by: Yonghong Song <yonghong.song@linux.dev>
> 
> [...]

Here is the summary with links:
  - [bpf-next,v2] bpf: Remove unused variable "prev_state"
    https://git.kernel.org/bpf/bpf-next/c/1b0215a3633a

You are awesome, thank you!
diff mbox series

Patch

diff --git a/samples/bpf/cpustat_kern.c b/samples/bpf/cpustat_kern.c
index 944f13fe1..7ec7143e2 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) {