From a9ebef2868933c439bad297bcc3f9b68c98202ef Mon Sep 17 00:00:00 2001 From: Jessie Yang Date: Fri, 17 Jan 2025 10:37:46 -0800 Subject: [PATCH] prov/efa: Remove x86-64 architecture check for static_assert 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 --- prov/efa/src/rdm/efa_rdm_pke.h | 2 +- prov/efa/src/rdm/efa_rdm_protocol.h | 2 +- prov/efa/src/rdm/efa_rdm_util.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/prov/efa/src/rdm/efa_rdm_pke.h b/prov/efa/src/rdm/efa_rdm_pke.h index 223822ce595..3bd0e51390d 100644 --- a/prov/efa/src/rdm/efa_rdm_pke.h +++ b/prov/efa/src/rdm/efa_rdm_pke.h @@ -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 diff --git a/prov/efa/src/rdm/efa_rdm_protocol.h b/prov/efa/src/rdm/efa_rdm_protocol.h index 8840ce5f401..a4e608a5180 100644 --- a/prov/efa/src/rdm/efa_rdm_protocol.h +++ b/prov/efa/src/rdm/efa_rdm_protocol.h @@ -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 diff --git a/prov/efa/src/rdm/efa_rdm_util.h b/prov/efa/src/rdm/efa_rdm_util.h index 7c3daa3432f..123fda9c59f 100644 --- a/prov/efa/src/rdm/efa_rdm_util.h +++ b/prov/efa/src/rdm/efa_rdm_util.h @@ -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