Skip to content

Commit

Permalink
prov/efa: Remove x86-64 architecture check for static_assert
Browse files Browse the repository at this point in the history
This commit removes the x86-64 architecture check from the static_assert
conditional compilation directive. The static_assert feature is not
architecture-dependent and should be checked on all platforms that
support it.

Signed-off-by: Jessie Yang <[email protected]>
  • Loading branch information
jiaxiyan committed Jan 17, 2025
1 parent a93beca commit a9ebef2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion prov/efa/src/rdm/efa_rdm_pke.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ struct efa_rdm_pke {
_Alignas(EFA_RDM_PKE_ALIGNMENT) char wiredata[0];
};

#if defined(static_assert) && defined(__x86_64__)
#if defined(static_assert)
static_assert(sizeof (struct efa_rdm_pke) % EFA_RDM_PKE_ALIGNMENT == 0, "efa_rdm_pke alignment check");
#endif

Expand Down
2 changes: 1 addition & 1 deletion prov/efa/src/rdm/efa_rdm_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ struct efa_ep_addr {
#define EFA_RDM_RUNT_PKT_END 148
#define EFA_RDM_EXTRA_REQ_PKT_END 148

#if defined(static_assert) && defined(__x86_64__)
#if defined(static_assert)
#define EFA_RDM_ENSURE_HEADER_SIZE(hdr, size) \
static_assert(sizeof (struct hdr) == (size), #hdr " size check")
#else
Expand Down
2 changes: 1 addition & 1 deletion prov/efa/src/rdm/efa_rdm_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#define EFA_RDM_MSG_PREFIX_SIZE (sizeof(struct efa_rdm_pke) + sizeof(struct efa_rdm_eager_msgrtm_hdr) + EFA_RDM_REQ_OPT_RAW_ADDR_HDR_SIZE)

#if defined(static_assert) && defined(__x86_64__)
#if defined(static_assert)
static_assert(EFA_RDM_MSG_PREFIX_SIZE % 8 == 0, "message prefix size alignment check");
#endif

Expand Down

0 comments on commit a9ebef2

Please sign in to comment.