summaryrefslogtreecommitdiff
path: root/include/rdma/ibta_vol1_c12.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/rdma/ibta_vol1_c12.h')
-rw-r--r--include/rdma/ibta_vol1_c12.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/rdma/ibta_vol1_c12.h b/include/rdma/ibta_vol1_c12.h
index 916db5c27dc5..269904425d3f 100644
--- a/include/rdma/ibta_vol1_c12.h
+++ b/include/rdma/ibta_vol1_c12.h
@@ -29,7 +29,12 @@
IBA_FIELD_MLOC(field_struct, \
(byte_offset + sizeof(struct ib_mad_hdr)), width, type)
#define CM_STRUCT(field_struct, total_len) \
- static_assert((total_len) % 32 == 0);
+ field_struct \
+ { \
+ struct ib_mad_hdr hdr; \
+ u32 _data[(total_len) / 32 + \
+ BUILD_BUG_ON_ZERO((total_len) % 32 != 0)]; \
+ }
/* Table 106 REQ Message Contents */
#define CM_REQ_LOCAL_COMM_ID CM_FIELD32_LOC(struct cm_req_msg, 0, 32)