From dd8804d7ad3c70fec2fb4eaa046def23df768552 Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Tue, 11 Jul 2017 11:57:17 -0500 Subject: [PATCH] Remove use of anonymous member in C builds. Tools/CodeXL will retain older versions of structs if them need them. Change-Id: I568d7b445778dd575ef71000b4b839300572288e [ROCm/ROCR-Runtime commit: a0a3587345017a2927c9e9c19cea8552f7dbe038] --- .../runtime/hsa-runtime/core/runtime/runtime.cpp | 2 +- .../runtime/hsa-runtime/inc/hsa_ext_amd.h | 13 +------------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp index 2a981ef004..84d1eeb68d 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp @@ -684,7 +684,7 @@ hsa_status_t Runtime::PtrInfo(void* ptr, hsa_amd_pointer_info_t* info, void* (*a hsa_amd_pointer_info_t retInfo; // check output struct is at least as large as the first info revision. - if (info->size < sizeof(struct hsa_amd_pointer_info_v1_s)) return HSA_STATUS_ERROR_INVALID_ARGUMENT; + if (info->size < 40) return HSA_STATUS_ERROR_INVALID_ARGUMENT; bool returnListData = ((alloc != nullptr) && (num_agents_accessible != nullptr) && (accessible != nullptr)); diff --git a/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ext_amd.h b/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ext_amd.h index 85bddcc518..bc026f26cc 100755 --- a/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ext_amd.h +++ b/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ext_amd.h @@ -1320,7 +1320,7 @@ typedef enum { * @brief Describes a memory allocation known to ROCr. * Within a ROCr major version this structure can only grow. */ -typedef struct hsa_amd_pointer_info_v1_s { +typedef struct hsa_amd_pointer_info_s { /* Size in bytes of this structure. Used for version control within a major ROCr revision. Set to sizeof(hsa_amd_pointer_t) prior to calling @@ -1349,17 +1349,6 @@ typedef struct hsa_amd_pointer_info_v1_s { Application provided value. */ void* userData; -} hsa_amd_pointer_info_v1_t; - -/** - * @brief Minor version updates to pointer info. - */ -#ifdef __cplusplus -typedef struct hsa_amd_pointer_info_v2_s : hsa_amd_pointer_info_v1_t { -#else -typedef struct hsa_amd_pointer_info_v2_t { - struct hsa_amd_pointer_info_v1_t; -#endif /* Reports an agent which "owns" (ie has preferred access to) the pool in which the allocation was made. When multiple agents share equal access to a pool (ex: multiple CPU agents, or multi-die