Skip to content

Commit

Permalink
bcm63xx_enet: Use ARRAY_SIZE instead of open coding it
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tobias Klauser authored and David S. Miller committed Apr 24, 2014
1 parent 4366004 commit 6afc0d7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/broadcom/bcm63xx_enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6afc0d7

Please sign in to comment.