From: Jim Cromie Date: Tue, 10 Apr 2012 14:56:03 +0000 (+0000) Subject: broadcom: replace open-coded ARRAY_SIZE with macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0db83cd85c278f2f7a2ba2948987983009cc0912;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git broadcom: replace open-coded ARRAY_SIZE with macro Signed-off-by: Jim Cromie Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c index 36037a677820..ab55979b3756 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c @@ -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)