diff options
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c index 3d746c887873..67a648c7d3a9 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | |||
@@ -46,7 +46,6 @@ static u32 hns_nic_get_link(struct net_device *net_dev) | |||
46 | u32 link_stat = priv->link; | 46 | u32 link_stat = priv->link; |
47 | struct hnae_handle *h; | 47 | struct hnae_handle *h; |
48 | 48 | ||
49 | assert(priv && priv->ae_handle); | ||
50 | h = priv->ae_handle; | 49 | h = priv->ae_handle; |
51 | 50 | ||
52 | if (priv->phy) { | 51 | if (priv->phy) { |
@@ -646,8 +645,6 @@ static void hns_nic_get_drvinfo(struct net_device *net_dev, | |||
646 | { | 645 | { |
647 | struct hns_nic_priv *priv = netdev_priv(net_dev); | 646 | struct hns_nic_priv *priv = netdev_priv(net_dev); |
648 | 647 | ||
649 | assert(priv); | ||
650 | |||
651 | strncpy(drvinfo->version, HNAE_DRIVER_VERSION, | 648 | strncpy(drvinfo->version, HNAE_DRIVER_VERSION, |
652 | sizeof(drvinfo->version)); | 649 | sizeof(drvinfo->version)); |
653 | drvinfo->version[sizeof(drvinfo->version) - 1] = '\0'; | 650 | drvinfo->version[sizeof(drvinfo->version) - 1] = '\0'; |
@@ -720,8 +717,6 @@ static int hns_set_pauseparam(struct net_device *net_dev, | |||
720 | struct hnae_handle *h; | 717 | struct hnae_handle *h; |
721 | struct hnae_ae_ops *ops; | 718 | struct hnae_ae_ops *ops; |
722 | 719 | ||
723 | assert(priv || priv->ae_handle); | ||
724 | |||
725 | h = priv->ae_handle; | 720 | h = priv->ae_handle; |
726 | ops = h->dev->ops; | 721 | ops = h->dev->ops; |
727 | 722 | ||
@@ -780,8 +775,6 @@ static int hns_set_coalesce(struct net_device *net_dev, | |||
780 | struct hnae_ae_ops *ops; | 775 | struct hnae_ae_ops *ops; |
781 | int ret; | 776 | int ret; |
782 | 777 | ||
783 | assert(priv || priv->ae_handle); | ||
784 | |||
785 | ops = priv->ae_handle->dev->ops; | 778 | ops = priv->ae_handle->dev->ops; |
786 | 779 | ||
787 | if (ec->tx_coalesce_usecs != ec->rx_coalesce_usecs) | 780 | if (ec->tx_coalesce_usecs != ec->rx_coalesce_usecs) |
@@ -1111,8 +1104,6 @@ void hns_get_regs(struct net_device *net_dev, struct ethtool_regs *cmd, | |||
1111 | struct hns_nic_priv *priv = netdev_priv(net_dev); | 1104 | struct hns_nic_priv *priv = netdev_priv(net_dev); |
1112 | struct hnae_ae_ops *ops; | 1105 | struct hnae_ae_ops *ops; |
1113 | 1106 | ||
1114 | assert(priv || priv->ae_handle); | ||
1115 | |||
1116 | ops = priv->ae_handle->dev->ops; | 1107 | ops = priv->ae_handle->dev->ops; |
1117 | 1108 | ||
1118 | cmd->version = HNS_CHIP_VERSION; | 1109 | cmd->version = HNS_CHIP_VERSION; |
@@ -1135,8 +1126,6 @@ static int hns_get_regs_len(struct net_device *net_dev) | |||
1135 | struct hns_nic_priv *priv = netdev_priv(net_dev); | 1126 | struct hns_nic_priv *priv = netdev_priv(net_dev); |
1136 | struct hnae_ae_ops *ops; | 1127 | struct hnae_ae_ops *ops; |
1137 | 1128 | ||
1138 | assert(priv || priv->ae_handle); | ||
1139 | |||
1140 | ops = priv->ae_handle->dev->ops; | 1129 | ops = priv->ae_handle->dev->ops; |
1141 | if (!ops->get_regs_len) { | 1130 | if (!ops->get_regs_len) { |
1142 | netdev_err(net_dev, "ops->get_regs_len is null!\n"); | 1131 | netdev_err(net_dev, "ops->get_regs_len is null!\n"); |