Skip to content

Commit

Permalink
broadcom: replace open-coded ARRAY_SIZE with macro
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jim Cromie authored and David S. Miller committed Apr 13, 2012
1 parent 60dfc62 commit 0db83cd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/broadcom/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -7343,8 +7343,7 @@ static struct {
{ "rx_fw_discards" },
};

#define BNX2_NUM_STATS (sizeof(bnx2_stats_str_arr)/\
sizeof(bnx2_stats_str_arr[0]))
#define BNX2_NUM_STATS ARRAY_SIZE(bnx2_stats_str_arr)

#define STATS_OFFSET32(offset_name) (offsetof(struct statistics_block, offset_name) / 4)

Expand Down

0 comments on commit 0db83cd

Please sign in to comment.