* [PATCH net-next 1/3] net: hyperv: remove use of bpf_op_t
[not found] <20220406213754.731066-1-kuba@kernel.org>
@ 2022-04-06 21:37 ` Jakub Kicinski
2022-04-07 13:12 ` Wei Liu
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Kicinski @ 2022-04-06 21:37 UTC (permalink / raw)
To: davem
Cc: netdev, pabeni, edumazet, Jakub Kicinski, kys, haiyangz, sthemmin,
wei.liu, decui, ast, daniel, andrii, kafai, songliubraving, yhs,
john.fastabend, kpsingh, hawk, linux-hyperv, bpf
Following patch will hide that typedef. There seems to be
no strong reason for hyperv to use it, so let's not.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: kys@microsoft.com
CC: haiyangz@microsoft.com
CC: sthemmin@microsoft.com
CC: wei.liu@kernel.org
CC: decui@microsoft.com
CC: pabeni@redhat.com
CC: ast@kernel.org
CC: daniel@iogearbox.net
CC: andrii@kernel.org
CC: kafai@fb.com
CC: songliubraving@fb.com
CC: yhs@fb.com
CC: john.fastabend@gmail.com
CC: kpsingh@kernel.org
CC: hawk@kernel.org
CC: linux-hyperv@vger.kernel.org
CC: bpf@vger.kernel.org
---
drivers/net/hyperv/netvsc_bpf.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/hyperv/netvsc_bpf.c b/drivers/net/hyperv/netvsc_bpf.c
index 7856905414eb..232c4a0efd7b 100644
--- a/drivers/net/hyperv/netvsc_bpf.c
+++ b/drivers/net/hyperv/netvsc_bpf.c
@@ -137,7 +137,6 @@ int netvsc_xdp_set(struct net_device *dev, struct bpf_prog *prog,
int netvsc_vf_setxdp(struct net_device *vf_netdev, struct bpf_prog *prog)
{
struct netdev_bpf xdp;
- bpf_op_t ndo_bpf;
int ret;
ASSERT_RTNL();
@@ -145,8 +144,7 @@ int netvsc_vf_setxdp(struct net_device *vf_netdev, struct bpf_prog *prog)
if (!vf_netdev)
return 0;
- ndo_bpf = vf_netdev->netdev_ops->ndo_bpf;
- if (!ndo_bpf)
+ if (!vf_netdev->netdev_ops->ndo_bpf)
return 0;
memset(&xdp, 0, sizeof(xdp));
@@ -157,7 +155,7 @@ int netvsc_vf_setxdp(struct net_device *vf_netdev, struct bpf_prog *prog)
xdp.command = XDP_SETUP_PROG;
xdp.prog = prog;
- ret = ndo_bpf(vf_netdev, &xdp);
+ ret = vf_netdev->netdev_ops->ndo_bpf(vf_netdev, &xdp);
if (ret && prog)
bpf_prog_put(prog);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread