summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-08-04 13:23:15 -0700
committerDavid S. Miller <davem@davemloft.net>2018-08-04 13:23:15 -0700
commit12e5e452aec3520f7a66718600eaa991b54098ad (patch)
tree1d5dc4ec0499658034e155b0e1d6b1b8d07ff6e9 /include
parentf13b546847ff5862ea313f3e79010c52c3fe32b4 (diff)
parent31ba191bf5ab2975c1955f1adf771a5a0b57afaa (diff)
Merge branch 'net-ARRAY_SIZE'
zhong jiang says: ==================== Use ARRAY_SIZE to replace computing the size zhong jiang (2): net:usb: Use ARRAY_SIZE instead of calculating the array size include/net/bond_3ad: Simplify the code by using the ARRAY_SIZE ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/bond_3ad.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/bond_3ad.h b/include/net/bond_3ad.h
index f358ad5e4214..fc3111515f5c 100644
--- a/include/net/bond_3ad.h
+++ b/include/net/bond_3ad.h
@@ -283,7 +283,7 @@ static inline const char *bond_3ad_churn_desc(churn_state_t state)
"none",
"unknown"
};
- int max_size = sizeof(churn_description) / sizeof(churn_description[0]);
+ int max_size = ARRAY_SIZE(churn_description);
if (state >= max_size)
state = max_size - 1;