summaryrefslogtreecommitdiff
path: root/drivers/net/ipa/ipa_table.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2021-07-26 20:40:08 +0300
committerDavid S. Miller <davem@davemloft.net>2021-07-27 00:38:11 +0300
commit546948bf362541857d4f500705efe08a2fe0bb95 (patch)
tree6c40d323d4d07b3d36e502e6d2541b33c9aa0340 /drivers/net/ipa/ipa_table.h
parentf2c1dac0abcfa93e8b20065b8d6b4b2b6f9990aa (diff)
downloadlinux-546948bf362541857d4f500705efe08a2fe0bb95.tar.xz
net: ipa: always validate filter and route tables
All checks in ipa_table_validate_build() are computed at build time, so build that unconditionally. In ipa_table_valid() calls to ipa_table_valid_one() are missing the IPA pointer parameter is missing in (a bug that shows up only when IPA_VALIDATE is defined). Don't bother checking whether hashed table memory regions are valid if hashed tables are not supported. With those things fixed, have these table validation functions built unconditionally (not dependent on IPA_VALIDATE). Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/ipa_table.h')
-rw-r--r--drivers/net/ipa/ipa_table.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/net/ipa/ipa_table.h b/drivers/net/ipa/ipa_table.h
index 1e2be9fce2f8..b6a9a0d79d68 100644
--- a/drivers/net/ipa/ipa_table.h
+++ b/drivers/net/ipa/ipa_table.h
@@ -16,8 +16,6 @@ struct ipa;
/* The maximum number of route table entries (IPv4, IPv6; hashed or not) */
#define IPA_ROUTE_COUNT_MAX 15
-#ifdef IPA_VALIDATE
-
/**
* ipa_table_valid() - Validate route and filter table memory regions
* @ipa: IPA pointer
@@ -35,20 +33,6 @@ bool ipa_table_valid(struct ipa *ipa);
*/
bool ipa_filter_map_valid(struct ipa *ipa, u32 filter_mask);
-#else /* !IPA_VALIDATE */
-
-static inline bool ipa_table_valid(struct ipa *ipa)
-{
- return true;
-}
-
-static inline bool ipa_filter_map_valid(struct ipa *ipa, u32 filter_mask)
-{
- return true;
-}
-
-#endif /* !IPA_VALIDATE */
-
/**
* ipa_table_hash_support() - Return true if hashed tables are supported
* @ipa: IPA pointer