diff options
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r-- | drivers/net/e1000e/ethtool.c | 3 | ||||
-rw-r--r-- | drivers/net/e1000e/phy.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c index b36b853bed1a..e6ff3af8ef0f 100644 --- a/drivers/net/e1000e/ethtool.c +++ b/drivers/net/e1000e/ethtool.c | |||
@@ -95,8 +95,7 @@ static const struct e1000_stats e1000_gstrings_stats[] = { | |||
95 | { "tx_dma_failed", E1000_STAT(tx_dma_failed) }, | 95 | { "tx_dma_failed", E1000_STAT(tx_dma_failed) }, |
96 | }; | 96 | }; |
97 | 97 | ||
98 | #define E1000_GLOBAL_STATS_LEN \ | 98 | #define E1000_GLOBAL_STATS_LEN ARRAY_SIZE(e1000_gstrings_stats) |
99 | sizeof(e1000_gstrings_stats) / sizeof(struct e1000_stats) | ||
100 | #define E1000_STATS_LEN (E1000_GLOBAL_STATS_LEN) | 99 | #define E1000_STATS_LEN (E1000_GLOBAL_STATS_LEN) |
101 | static const char e1000_gstrings_test[][ETH_GSTRING_LEN] = { | 100 | static const char e1000_gstrings_test[][ETH_GSTRING_LEN] = { |
102 | "Register test (offline)", "Eeprom test (offline)", | 101 | "Register test (offline)", "Eeprom test (offline)", |
diff --git a/drivers/net/e1000e/phy.c b/drivers/net/e1000e/phy.c index 793231810ae0..fc6fee112f1c 100644 --- a/drivers/net/e1000e/phy.c +++ b/drivers/net/e1000e/phy.c | |||
@@ -49,8 +49,7 @@ static const u16 e1000_igp_2_cable_length_table[] = | |||
49 | 100, 105, 109, 113, 116, 119, 122, 124, 104, 109, 114, 118, 121, | 49 | 100, 105, 109, 113, 116, 119, 122, 124, 104, 109, 114, 118, 121, |
50 | 124}; | 50 | 124}; |
51 | #define IGP02E1000_CABLE_LENGTH_TABLE_SIZE \ | 51 | #define IGP02E1000_CABLE_LENGTH_TABLE_SIZE \ |
52 | (sizeof(e1000_igp_2_cable_length_table) / \ | 52 | ARRAY_SIZE(e1000_igp_2_cable_length_table) |
53 | sizeof(e1000_igp_2_cable_length_table[0])) | ||
54 | 53 | ||
55 | /** | 54 | /** |
56 | * e1000e_check_reset_block_generic - Check if PHY reset is blocked | 55 | * e1000e_check_reset_block_generic - Check if PHY reset is blocked |