From: Valentine Fatiev <valentinef@nvidia.com>
Subject: [PATCH] BACKPORT:
 drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_priv.h

Change-Id: I7fec7381e61f177976f5fa7d4d7b9673f1a49079
---
 drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_priv.h | 6 ++++++
 1 file changed, 6 insertions(+)

--- a/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_priv.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_priv.h
@@ -54,7 +54,9 @@
 	 MLX5_ESW_BRIDGE_INGRESS_TABLE_UNTAGGED_GRP_SIZE - 1)
 #define MLX5_ESW_BRIDGE_INGRESS_TABLE_SIZE			\
 	(MLX5_ESW_BRIDGE_INGRESS_TABLE_MAC_GRP_IDX_TO + 1)
+#ifdef HAVE_STATIC_ASSERT
 static_assert(MLX5_ESW_BRIDGE_INGRESS_TABLE_SIZE == 1048576);
+#endif
 
 #define MLX5_ESW_BRIDGE_EGRESS_TABLE_VLAN_GRP_SIZE 131072
 #define MLX5_ESW_BRIDGE_EGRESS_TABLE_MAC_GRP_SIZE (262144 - 1)
@@ -77,7 +79,9 @@ static_assert(MLX5_ESW_BRIDGE_INGRESS_TA
 	MLX5_ESW_BRIDGE_EGRESS_TABLE_MISS_GRP_IDX_FROM
 #define MLX5_ESW_BRIDGE_EGRESS_TABLE_SIZE			\
 	(MLX5_ESW_BRIDGE_EGRESS_TABLE_MISS_GRP_IDX_TO + 1)
+#ifdef HAVE_STATIC_ASSERT
 static_assert(MLX5_ESW_BRIDGE_EGRESS_TABLE_SIZE == 524288);
+#endif
 
 #define MLX5_ESW_BRIDGE_SKIP_TABLE_SIZE 0
 
@@ -106,7 +110,9 @@ static_assert(MLX5_ESW_BRIDGE_EGRESS_TAB
 
 #define MLX5_ESW_BRIDGE_MCAST_TABLE_SIZE			\
 	(MLX5_ESW_BRIDGE_MCAST_TABLE_FWD_GRP_IDX_TO + 1)
+#ifdef HAVE_STATIC_ASSERT
 static_assert(MLX5_ESW_BRIDGE_MCAST_TABLE_SIZE == 8192);
+#endif
 
 enum {
 	MLX5_ESW_BRIDGE_LEVEL_INGRESS_TABLE,
