From: Tobias Klauser Date: Wed, 23 Apr 2014 17:42:50 +0000 (+0200) Subject: bcm63xx_enet: Use ARRAY_SIZE instead of open coding it X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6afc0d7a85770abd282ebed41f0f35cde390d861;p=linux-beck.git 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 Signed-off-by: David S. Miller --- 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,