Commit 77df1db8 authored by Jiri Pirko's avatar Jiri Pirko Committed by Jakub Kicinski
Browse files

net: remove unused ndo_get_devlink_port



Remove ndo_get_devlink_port which is no longer used alongside with the
implementations in drivers.

Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 8eba37f7
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -13073,13 +13073,6 @@ int bnxt_get_port_parent_id(struct net_device *dev,
	return 0;
}

static struct devlink_port *bnxt_get_devlink_port(struct net_device *dev)
{
	struct bnxt *bp = netdev_priv(dev);

	return &bp->dl_port;
}

static const struct net_device_ops bnxt_netdev_ops = {
	.ndo_open		= bnxt_open,
	.ndo_start_xmit		= bnxt_start_xmit,
@@ -13111,7 +13104,6 @@ static const struct net_device_ops bnxt_netdev_ops = {
	.ndo_xdp_xmit		= bnxt_xdp_xmit,
	.ndo_bridge_getlink	= bnxt_bridge_getlink,
	.ndo_bridge_setlink	= bnxt_bridge_setlink,
	.ndo_get_devlink_port	= bnxt_get_devlink_port,
};

static void bnxt_remove_one(struct pci_dev *pdev)
+0 −8
Original line number Diff line number Diff line
@@ -1178,13 +1178,6 @@ static int fun_xdp(struct net_device *dev, struct netdev_bpf *xdp)
	}
}

static struct devlink_port *fun_get_devlink_port(struct net_device *netdev)
{
	struct funeth_priv *fp = netdev_priv(netdev);

	return &fp->dl_port;
}

static int fun_init_vports(struct fun_ethdev *ed, unsigned int n)
{
	if (ed->num_vports)
@@ -1350,7 +1343,6 @@ static const struct net_device_ops fun_netdev_ops = {
	.ndo_set_vf_vlan	= fun_set_vf_vlan,
	.ndo_set_vf_rate	= fun_set_vf_rate,
	.ndo_get_vf_config	= fun_get_vf_config,
	.ndo_get_devlink_port	= fun_get_devlink_port,
};

#define GSO_ENCAP_FLAGS (NETIF_F_GSO_GRE | NETIF_F_GSO_IPXIP4 | \
+0 −15
Original line number Diff line number Diff line
@@ -298,20 +298,6 @@ static int ice_clear_promisc(struct ice_vsi *vsi, u8 promisc_m)
	return status;
}

/**
 * ice_get_devlink_port - Get devlink port from netdev
 * @netdev: the netdevice structure
 */
static struct devlink_port *ice_get_devlink_port(struct net_device *netdev)
{
	struct ice_pf *pf = ice_netdev_to_pf(netdev);

	if (!ice_is_switchdev_running(pf))
		return NULL;

	return &pf->devlink_port;
}

/**
 * ice_vsi_sync_fltr - Update the VSI filter list to the HW
 * @vsi: ptr to the VSI
@@ -9107,5 +9093,4 @@ static const struct net_device_ops ice_netdev_ops = {
	.ndo_bpf = ice_xdp,
	.ndo_xdp_xmit = ice_xdp_xmit,
	.ndo_xsk_wakeup = ice_xsk_wakeup,
	.ndo_get_devlink_port = ice_get_devlink_port,
};
+0 −9
Original line number Diff line number Diff line
@@ -134,14 +134,6 @@ static int ice_repr_stop(struct net_device *netdev)
	return 0;
}

static struct devlink_port *
ice_repr_get_devlink_port(struct net_device *netdev)
{
	struct ice_repr *repr = ice_netdev_to_repr(netdev);

	return &repr->vf->devlink_port;
}

/**
 * ice_repr_sp_stats64 - get slow path stats for port representor
 * @dev: network interface device structure
@@ -250,7 +242,6 @@ static const struct net_device_ops ice_repr_netdev_ops = {
	.ndo_open = ice_repr_open,
	.ndo_stop = ice_repr_stop,
	.ndo_start_xmit = ice_eswitch_port_start_xmit,
	.ndo_get_devlink_port = ice_repr_get_devlink_port,
	.ndo_setup_tc = ice_repr_setup_tc,
	.ndo_has_offload_stats = ice_repr_ndo_has_offload_stats,
	.ndo_get_offload_stats = ice_repr_ndo_get_offload_stats,
+0 −7
Original line number Diff line number Diff line
@@ -445,13 +445,6 @@ void prestera_devlink_port_unregister(struct prestera_port *port)
	devlink_port_unregister(&port->dl_port);
}

struct devlink_port *prestera_devlink_get_port(struct net_device *dev)
{
	struct prestera_port *port = netdev_priv(dev);

	return &port->dl_port;
}

int prestera_devlink_traps_register(struct prestera_switch *sw)
{
	const u32 groups_count = ARRAY_SIZE(prestera_trap_groups_arr);
Loading