Skip to content

Commit b28d893

Browse files
committed
ofi_util.h: Make util_prov::info non const
The verbs provider requires to set this list dynamically, so make it non const. Signed-off-by: Sylvain Didelot <[email protected]>
1 parent 39f5f2e commit b28d893

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/ofi_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ typedef void (*ofi_alter_info_t)(uint32_t version,
159159

160160
struct util_prov {
161161
const struct fi_provider *prov;
162-
const struct fi_info *info;
162+
struct fi_info *info;
163163
ofi_alter_info_t alter_defaults;
164164
const int flags;
165165
};

prov/verbs/src/verbs_info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ static int vrb_device_has_ipoib_addr(const char *dev_name)
13491349

13501350
#define VERBS_NUM_DOMAIN_TYPES 3
13511351

1352-
static int vrb_init_info(const struct fi_info **all_infos)
1352+
static int vrb_init_info(struct fi_info **all_infos)
13531353
{
13541354
struct ibv_context **ctx_list;
13551355
struct fi_info *fi = NULL, *tail = NULL;

prov/verbs/src/verbs_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ static void vrb_fini(void)
792792
ofi_mem_fini();
793793
#endif
794794
ofi_mutex_destroy(&vrb_info_mutex);
795-
fi_freeinfo((void *)vrb_util_prov.info);
795+
fi_freeinfo(vrb_util_prov.info);
796796
verbs_devs_free();
797797
vrb_os_fini();
798798
vrb_util_prov.info = NULL;

0 commit comments

Comments
 (0)