Commit d40fa7ee authored by Yunsheng Lin's avatar Yunsheng Lin Committed by David S. Miller

net: hns3: remove some ops in struct hns3_nic_ops

The fill_desc ops has only one implementation, and
get_rxd_bnum has not been used, so this patch removes
them.
Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 47e7b13b
...@@ -1279,7 +1279,7 @@ netdev_tx_t hns3_nic_net_xmit(struct sk_buff *skb, struct net_device *netdev) ...@@ -1279,7 +1279,7 @@ netdev_tx_t hns3_nic_net_xmit(struct sk_buff *skb, struct net_device *netdev)
next_to_use_head = ring->next_to_use; next_to_use_head = ring->next_to_use;
ret = priv->ops.fill_desc(ring, skb, size, seg_num == 1 ? 1 : 0, ret = hns3_fill_desc(ring, skb, size, seg_num == 1 ? 1 : 0,
DESC_TYPE_SKB); DESC_TYPE_SKB);
if (ret) if (ret)
goto head_fill_err; goto head_fill_err;
...@@ -1290,7 +1290,7 @@ netdev_tx_t hns3_nic_net_xmit(struct sk_buff *skb, struct net_device *netdev) ...@@ -1290,7 +1290,7 @@ netdev_tx_t hns3_nic_net_xmit(struct sk_buff *skb, struct net_device *netdev)
frag = &skb_shinfo(skb)->frags[i - 1]; frag = &skb_shinfo(skb)->frags[i - 1];
size = skb_frag_size(frag); size = skb_frag_size(frag);
ret = priv->ops.fill_desc(ring, frag, size, ret = hns3_fill_desc(ring, frag, size,
seg_num - 1 == i ? 1 : 0, seg_num - 1 == i ? 1 : 0,
DESC_TYPE_PAGE); DESC_TYPE_PAGE);
...@@ -3579,7 +3579,6 @@ static void hns3_nic_set_priv_ops(struct net_device *netdev) ...@@ -3579,7 +3579,6 @@ static void hns3_nic_set_priv_ops(struct net_device *netdev)
{ {
struct hns3_nic_priv *priv = netdev_priv(netdev); struct hns3_nic_priv *priv = netdev_priv(netdev);
priv->ops.fill_desc = hns3_fill_desc;
if ((netdev->features & NETIF_F_TSO) || if ((netdev->features & NETIF_F_TSO) ||
(netdev->features & NETIF_F_TSO6)) (netdev->features & NETIF_F_TSO6))
priv->ops.maybe_stop_tx = hns3_nic_maybe_stop_tso; priv->ops.maybe_stop_tx = hns3_nic_maybe_stop_tso;
......
...@@ -444,11 +444,8 @@ struct hns3_nic_ring_data { ...@@ -444,11 +444,8 @@ struct hns3_nic_ring_data {
}; };
struct hns3_nic_ops { struct hns3_nic_ops {
int (*fill_desc)(struct hns3_enet_ring *ring, void *priv,
int size, int frag_end, enum hns_desc_type type);
int (*maybe_stop_tx)(struct sk_buff **out_skb, int (*maybe_stop_tx)(struct sk_buff **out_skb,
int *bnum, struct hns3_enet_ring *ring); int *bnum, struct hns3_enet_ring *ring);
void (*get_rxd_bnum)(u32 bnum_flag, int *out_bnum);
}; };
enum hns3_flow_level_range { enum hns3_flow_level_range {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment