[RFC,3/5] tap: remove unnecessary cast in call to bpf_load

Message ID 20240105222909.139674-4-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series BPF infrastructure enhancements |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Jan. 5, 2024, 10:28 p.m. UTC
  The callers already have the correct data type.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/tap/tap_bpf_api.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
  

Patch

diff --git a/drivers/net/tap/tap_bpf_api.c b/drivers/net/tap/tap_bpf_api.c
index d176da0802eb..c754c167a764 100644
--- a/drivers/net/tap/tap_bpf_api.c
+++ b/drivers/net/tap/tap_bpf_api.c
@@ -32,9 +32,8 @@  int tap_flow_bpf_cls_q(__u32 queue_idx)
 	cls_q_insns[1].imm = queue_idx;
 
 	return bpf_load(BPF_PROG_TYPE_SCHED_CLS,
-		(struct bpf_insn *)cls_q_insns,
-		RTE_DIM(cls_q_insns),
-		"Dual BSD/GPL");
+			cls_q_insns, RTE_DIM(cls_q_insns),
+			"Dual BSD/GPL");
 }
 
 /**
@@ -55,9 +54,8 @@  int tap_flow_bpf_calc_l3_l4_hash(__u32 key_idx, int map_fd)
 	l3_l4_hash_insns[9].imm = map_fd;
 
 	return bpf_load(BPF_PROG_TYPE_SCHED_ACT,
-		(struct bpf_insn *)l3_l4_hash_insns,
-		RTE_DIM(l3_l4_hash_insns),
-		"Dual BSD/GPL");
+			l3_l4_hash_insns, RTE_DIM(l3_l4_hash_insns),
+			"Dual BSD/GPL");
 }
 
 /**