aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tehuti.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tehuti.c')
-rw-r--r--drivers/net/tehuti.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c
index 21230c97b2a0..ccb8d447cec6 100644
--- a/drivers/net/tehuti.c
+++ b/drivers/net/tehuti.c
@@ -2174,8 +2174,7 @@ bdx_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)
2174 strlcat(drvinfo->bus_info, pci_name(priv->pdev), 2174 strlcat(drvinfo->bus_info, pci_name(priv->pdev),
2175 sizeof(drvinfo->bus_info)); 2175 sizeof(drvinfo->bus_info));
2176 2176
2177 drvinfo->n_stats = ((priv->stats_flag) ? 2177 drvinfo->n_stats = ((priv->stats_flag) ? ARRAY_SIZE(bdx_stat_names) : 0);
2178 (sizeof(bdx_stat_names) / ETH_GSTRING_LEN) : 0);
2179 drvinfo->testinfo_len = 0; 2178 drvinfo->testinfo_len = 0;
2180 drvinfo->regdump_len = 0; 2179 drvinfo->regdump_len = 0;
2181 drvinfo->eedump_len = 0; 2180 drvinfo->eedump_len = 0;
@@ -2375,10 +2374,9 @@ static void bdx_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
2375static int bdx_get_stats_count(struct net_device *netdev) 2374static int bdx_get_stats_count(struct net_device *netdev)
2376{ 2375{
2377 struct bdx_priv *priv = netdev->priv; 2376 struct bdx_priv *priv = netdev->priv;
2378 BDX_ASSERT(sizeof(bdx_stat_names) / ETH_GSTRING_LEN 2377 BDX_ASSERT(ARRAY_SIZE(bdx_stat_names)
2379 != sizeof(struct bdx_stats) / sizeof(u64)); 2378 != sizeof(struct bdx_stats) / sizeof(u64));
2380 return ((priv->stats_flag) ? (sizeof(bdx_stat_names) / ETH_GSTRING_LEN) 2379 return ((priv->stats_flag) ? ARRAY_SIZE(bdx_stat_names) : 0);
2381 : 0);
2382} 2380}
2383 2381
2384/* 2382/*