Skip to content

Commit

Permalink
Merge pull request #111 from NVIDIA/cleanups
Browse files Browse the repository at this point in the history
rename gdrapi internal functions
  • Loading branch information
drossetti authored Aug 4, 2020
2 parents 38811a9 + 6beafb0 commit ec5c310
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gdrapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ static inline int ptr_is_aligned(const void *ptr, unsigned powof2)
return is_aligned(addr, powof2);
}

static int gdr_copy_to_bar(void *map_d_ptr, const void *h_ptr, size_t size, int wc_mapping)
static int gdr_copy_to_mapping_internal(void *map_d_ptr, const void *h_ptr, size_t size, int wc_mapping)
{
if (first_time) {
gdr_init_cpu_flags();
Expand Down Expand Up @@ -570,7 +570,7 @@ static int gdr_copy_to_bar(void *map_d_ptr, const void *h_ptr, size_t size, int
return 0;
}

static int gdr_copy_from_bar(void *h_ptr, const void *map_d_ptr, size_t size, int wc_mapping)
static int gdr_copy_from_mapping_internal(void *h_ptr, const void *map_d_ptr, size_t size, int wc_mapping)
{
if (first_time) {
gdr_init_cpu_flags();
Expand Down Expand Up @@ -628,7 +628,7 @@ int gdr_copy_to_mapping(gdr_mh_t handle, void *map_d_ptr, const void *h_ptr, siz
gdr_err("mh is not mapped yet\n");
return EINVAL;
}
return gdr_copy_to_bar(map_d_ptr, h_ptr, size, mh->wc_mapping);
return gdr_copy_to_mapping_internal(map_d_ptr, h_ptr, size, mh->wc_mapping);
}

int gdr_copy_from_mapping(gdr_mh_t handle, void *h_ptr, const void *map_d_ptr, size_t size)
Expand All @@ -638,7 +638,7 @@ int gdr_copy_from_mapping(gdr_mh_t handle, void *h_ptr, const void *map_d_ptr, s
gdr_err("mh is not mapped yet\n");
return EINVAL;
}
return gdr_copy_from_bar(h_ptr, map_d_ptr, size, mh->wc_mapping);
return gdr_copy_from_mapping_internal(h_ptr, map_d_ptr, size, mh->wc_mapping);
}


Expand Down

0 comments on commit ec5c310

Please sign in to comment.