projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4366004
)
bcm63xx_enet: Use ARRAY_SIZE instead of open coding it
author
Tobias Klauser
<
[email protected]
>
Wed, 23 Apr 2014 17:42:50 +0000
(19:42 +0200)
committer
David S. Miller
<
[email protected]
>
Thu, 24 Apr 2014 17:38:57 +0000
(13:38 -0400)
Use the ARRAY_SIZE macro to determine the number of entries in
bcm_enet_gstrings_stats.
Signed-off-by: Tobias Klauser <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/broadcom/bcm63xx_enet.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index a7d11f5565d69342ad296471a9a5d44f8d7c51d5..8db34d3896758346a0dfeb24458f4a81119da720 100644
(file)
--- 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,