[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220406213754.731066-2-kuba@kernel.org>
Date: Wed, 6 Apr 2022 14:37:52 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, pabeni@...hat.com, edumazet@...gle.com,
Jakub Kicinski <kuba@...nel.org>, kys@...rosoft.com,
haiyangz@...rosoft.com, sthemmin@...rosoft.com, wei.liu@...nel.org,
decui@...rosoft.com, ast@...nel.org, daniel@...earbox.net,
andrii@...nel.org, kafai@...com, songliubraving@...com, yhs@...com,
john.fastabend@...il.com, kpsingh@...nel.org, hawk@...nel.org,
linux-hyperv@...r.kernel.org, bpf@...r.kernel.org
Subject: [PATCH net-next 1/3] net: hyperv: remove use of bpf_op_t
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@...nel.org>
---
CC: kys@...rosoft.com
CC: haiyangz@...rosoft.com
CC: sthemmin@...rosoft.com
CC: wei.liu@...nel.org
CC: decui@...rosoft.com
CC: pabeni@...hat.com
CC: ast@...nel.org
CC: daniel@...earbox.net
CC: andrii@...nel.org
CC: kafai@...com
CC: songliubraving@...com
CC: yhs@...com
CC: john.fastabend@...il.com
CC: kpsingh@...nel.org
CC: hawk@...nel.org
CC: linux-hyperv@...r.kernel.org
CC: bpf@...r.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
Powered by blists - more mailing lists