malloc: use pointer diff macro in IOVA mapping
Use RTE_PTR_DIFF macro in rte_mem_virt2iova api. Suggested-by: Anatoly Burakov <anatoly.burakov@intel.com> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
This commit is contained in:
parent
87cf4c6cca
commit
b51c140a1e
@ -262,6 +262,6 @@ rte_malloc_virt2iova(const void *addr)
|
||||
iova = (uintptr_t)addr;
|
||||
else
|
||||
iova = elem->ms->iova +
|
||||
((uintptr_t)addr - (uintptr_t)elem->ms->addr);
|
||||
RTE_PTR_DIFF(addr, elem->ms->addr);
|
||||
return iova;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user