diff options
author | Alex Elder <elder@linaro.org> | 2021-03-28 19:31:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-29 03:12:03 +0200 |
commit | 4ea29143ebe6c453f5fddc80ffe4ed046f44aa3a (patch) | |
tree | fc26c4ae4139e72f5fd5b3d05f69d28120ab6db5 /drivers/net/ipa/ipa_cmd.c | |
parent | net: ipa: DMA addresses are nicely aligned (diff) | |
download | linux-4ea29143ebe6c453f5fddc80ffe4ed046f44aa3a.tar.xz linux-4ea29143ebe6c453f5fddc80ffe4ed046f44aa3a.zip |
net: ipa: kill IPA_TABLE_ENTRY_SIZE
Entries in an IPA route or filter table are 64-bit little-endian
addresses, each of which refers to a routing or filtering rule.
The format of these table slots are fixed, but IPA_TABLE_ENTRY_SIZE
is used to define their size. This symbol doesn't really add value,
and I think it unnecessarily obscures what a table entry *is*.
So get rid of IPA_TABLE_ENTRY_SIZE, and just use sizeof(__le64) in
its place throughout the code.
Update the comments in "ipa_table.c" to provide a little better
explanation of these table slots.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/ipa_cmd.c')
-rw-r--r-- | drivers/net/ipa/ipa_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ipa/ipa_cmd.c b/drivers/net/ipa/ipa_cmd.c index 2ac6dd8413de..525cdf28d9ea 100644 --- a/drivers/net/ipa/ipa_cmd.c +++ b/drivers/net/ipa/ipa_cmd.c @@ -153,7 +153,7 @@ static void ipa_cmd_validate_build(void) * of entries, as and IPv4 and IPv6 route tables have the same number * of entries. */ -#define TABLE_SIZE (TABLE_COUNT_MAX * IPA_TABLE_ENTRY_SIZE) +#define TABLE_SIZE (TABLE_COUNT_MAX * sizeof(__le64)) #define TABLE_COUNT_MAX max_t(u32, IPA_ROUTE_COUNT_MAX, IPA_FILTER_COUNT_MAX) BUILD_BUG_ON(TABLE_SIZE > field_max(IP_FLTRT_FLAGS_HASH_SIZE_FMASK)); BUILD_BUG_ON(TABLE_SIZE > field_max(IP_FLTRT_FLAGS_NHASH_SIZE_FMASK)); |