diff options
author | Alejandro Martinez Ruiz <alex@flawedcode.org> | 2007-10-18 04:16:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:03:37 -0500 |
commit | c00acf46deb18926931ba264510353cf22b98a79 (patch) | |
tree | 7b7105d3505cb13aa0474e0bd89b23d7b9f2b958 /drivers/net/ixgbe | |
parent | 4c3616cdda0632a3d0e39069765f9ea0e6bd093e (diff) |
netdev: ARRAY_SIZE() cleanups
Convert array size calculations to use ARRAY_SIZE().
Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_ethtool.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index a4e576a0c543..36353447716d 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -96,8 +96,7 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = { | |||
96 | ((((struct ixgbe_adapter *)netdev->priv)->num_tx_queues + \ | 96 | ((((struct ixgbe_adapter *)netdev->priv)->num_tx_queues + \ |
97 | ((struct ixgbe_adapter *)netdev->priv)->num_rx_queues) * \ | 97 | ((struct ixgbe_adapter *)netdev->priv)->num_rx_queues) * \ |
98 | (sizeof(struct ixgbe_queue_stats) / sizeof(u64))) | 98 | (sizeof(struct ixgbe_queue_stats) / sizeof(u64))) |
99 | #define IXGBE_GLOBAL_STATS_LEN \ | 99 | #define IXGBE_GLOBAL_STATS_LEN ARRAY_SIZE(ixgbe_gstrings_stats) |
100 | sizeof(ixgbe_gstrings_stats) / sizeof(struct ixgbe_stats) | ||
101 | #define IXGBE_STATS_LEN (IXGBE_GLOBAL_STATS_LEN + IXGBE_QUEUE_STATS_LEN) | 100 | #define IXGBE_STATS_LEN (IXGBE_GLOBAL_STATS_LEN + IXGBE_QUEUE_STATS_LEN) |
102 | 101 | ||
103 | static int ixgbe_get_settings(struct net_device *netdev, | 102 | static int ixgbe_get_settings(struct net_device *netdev, |