diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-04-23 21:42:50 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-24 21:38:57 +0400 |
commit | 6afc0d7a85770abd282ebed41f0f35cde390d861 (patch) | |
tree | 574e108ce7e48234ad7dc98e30ec9a2a77dc8d47 /drivers/net/ethernet/broadcom/bcm63xx_enet.c | |
parent | 4366004d77278a90c18f92f7cb9ec0c264da563d (diff) | |
download | linux-6afc0d7a85770abd282ebed41f0f35cde390d861.tar.xz |
bcm63xx_enet: Use ARRAY_SIZE instead of open coding it
Use the ARRAY_SIZE macro to determine the number of entries in
bcm_enet_gstrings_stats.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bcm63xx_enet.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c index a7d11f5565d6..8db34d389675 100644 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c @@ -1315,8 +1315,7 @@ static const struct bcm_enet_stats bcm_enet_gstrings_stats[] = { }; -#define BCM_ENET_STATS_LEN \ - (sizeof(bcm_enet_gstrings_stats) / sizeof(struct bcm_enet_stats)) +#define BCM_ENET_STATS_LEN ARRAY_SIZE(bcm_enet_gstrings_stats) static const u32 unused_mib_regs[] = { ETH_MIB_TX_ALL_OCTETS, |