Loading drivers/net/e1000e/ethtool.c +1 −2 Original line number Diff line number Diff line Loading @@ -95,8 +95,7 @@ static const struct e1000_stats e1000_gstrings_stats[] = { { "tx_dma_failed", E1000_STAT(tx_dma_failed) }, }; #define E1000_GLOBAL_STATS_LEN \ sizeof(e1000_gstrings_stats) / sizeof(struct e1000_stats) #define E1000_GLOBAL_STATS_LEN ARRAY_SIZE(e1000_gstrings_stats) #define E1000_STATS_LEN (E1000_GLOBAL_STATS_LEN) static const char e1000_gstrings_test[][ETH_GSTRING_LEN] = { "Register test (offline)", "Eeprom test (offline)", Loading drivers/net/e1000e/phy.c +1 −2 Original line number Diff line number Diff line Loading @@ -49,8 +49,7 @@ static const u16 e1000_igp_2_cable_length_table[] = 100, 105, 109, 113, 116, 119, 122, 124, 104, 109, 114, 118, 121, 124}; #define IGP02E1000_CABLE_LENGTH_TABLE_SIZE \ (sizeof(e1000_igp_2_cable_length_table) / \ sizeof(e1000_igp_2_cable_length_table[0])) ARRAY_SIZE(e1000_igp_2_cable_length_table) /** * e1000e_check_reset_block_generic - Check if PHY reset is blocked Loading drivers/net/ixgbe/ixgbe_ethtool.c +1 −2 Original line number Diff line number Diff line Loading @@ -96,8 +96,7 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = { ((((struct ixgbe_adapter *)netdev->priv)->num_tx_queues + \ ((struct ixgbe_adapter *)netdev->priv)->num_rx_queues) * \ (sizeof(struct ixgbe_queue_stats) / sizeof(u64))) #define IXGBE_GLOBAL_STATS_LEN \ sizeof(ixgbe_gstrings_stats) / sizeof(struct ixgbe_stats) #define IXGBE_GLOBAL_STATS_LEN ARRAY_SIZE(ixgbe_gstrings_stats) #define IXGBE_STATS_LEN (IXGBE_GLOBAL_STATS_LEN + IXGBE_QUEUE_STATS_LEN) static int ixgbe_get_settings(struct net_device *netdev, Loading drivers/net/tehuti.c +1 −1 Original line number Diff line number Diff line Loading @@ -621,7 +621,7 @@ static int bdx_open(struct net_device *ndev) static void __init bdx_firmware_endianess(void) { int i; for (i = 0; i < sizeof(s_firmLoad) / sizeof(u32); i++) for (i = 0; i < ARRAY_SIZE(s_firmLoad); i++) s_firmLoad[i] = CPU_CHIP_SWAP32(s_firmLoad[i]); } Loading drivers/net/tulip/de4x5.c +1 −1 Original line number Diff line number Diff line Loading @@ -4168,7 +4168,7 @@ de4x5_bad_srom(struct de4x5_private *lp) { int i, status = 0; for (i=0; i<sizeof(enet_det)/ETH_ALEN; i++) { for (i=0; i < ARRAY_SIZE(enet_det); i++) { if (!de4x5_strncmp((char *)&lp->srom, (char *)&enet_det[i], 3) && !de4x5_strncmp((char *)&lp->srom+0x10, (char *)&enet_det[i], 3)) { if (i == 0) { Loading Loading
drivers/net/e1000e/ethtool.c +1 −2 Original line number Diff line number Diff line Loading @@ -95,8 +95,7 @@ static const struct e1000_stats e1000_gstrings_stats[] = { { "tx_dma_failed", E1000_STAT(tx_dma_failed) }, }; #define E1000_GLOBAL_STATS_LEN \ sizeof(e1000_gstrings_stats) / sizeof(struct e1000_stats) #define E1000_GLOBAL_STATS_LEN ARRAY_SIZE(e1000_gstrings_stats) #define E1000_STATS_LEN (E1000_GLOBAL_STATS_LEN) static const char e1000_gstrings_test[][ETH_GSTRING_LEN] = { "Register test (offline)", "Eeprom test (offline)", Loading
drivers/net/e1000e/phy.c +1 −2 Original line number Diff line number Diff line Loading @@ -49,8 +49,7 @@ static const u16 e1000_igp_2_cable_length_table[] = 100, 105, 109, 113, 116, 119, 122, 124, 104, 109, 114, 118, 121, 124}; #define IGP02E1000_CABLE_LENGTH_TABLE_SIZE \ (sizeof(e1000_igp_2_cable_length_table) / \ sizeof(e1000_igp_2_cable_length_table[0])) ARRAY_SIZE(e1000_igp_2_cable_length_table) /** * e1000e_check_reset_block_generic - Check if PHY reset is blocked Loading
drivers/net/ixgbe/ixgbe_ethtool.c +1 −2 Original line number Diff line number Diff line Loading @@ -96,8 +96,7 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = { ((((struct ixgbe_adapter *)netdev->priv)->num_tx_queues + \ ((struct ixgbe_adapter *)netdev->priv)->num_rx_queues) * \ (sizeof(struct ixgbe_queue_stats) / sizeof(u64))) #define IXGBE_GLOBAL_STATS_LEN \ sizeof(ixgbe_gstrings_stats) / sizeof(struct ixgbe_stats) #define IXGBE_GLOBAL_STATS_LEN ARRAY_SIZE(ixgbe_gstrings_stats) #define IXGBE_STATS_LEN (IXGBE_GLOBAL_STATS_LEN + IXGBE_QUEUE_STATS_LEN) static int ixgbe_get_settings(struct net_device *netdev, Loading
drivers/net/tehuti.c +1 −1 Original line number Diff line number Diff line Loading @@ -621,7 +621,7 @@ static int bdx_open(struct net_device *ndev) static void __init bdx_firmware_endianess(void) { int i; for (i = 0; i < sizeof(s_firmLoad) / sizeof(u32); i++) for (i = 0; i < ARRAY_SIZE(s_firmLoad); i++) s_firmLoad[i] = CPU_CHIP_SWAP32(s_firmLoad[i]); } Loading
drivers/net/tulip/de4x5.c +1 −1 Original line number Diff line number Diff line Loading @@ -4168,7 +4168,7 @@ de4x5_bad_srom(struct de4x5_private *lp) { int i, status = 0; for (i=0; i<sizeof(enet_det)/ETH_ALEN; i++) { for (i=0; i < ARRAY_SIZE(enet_det); i++) { if (!de4x5_strncmp((char *)&lp->srom, (char *)&enet_det[i], 3) && !de4x5_strncmp((char *)&lp->srom+0x10, (char *)&enet_det[i], 3)) { if (i == 0) { Loading