Skip to content

Commit

Permalink
iommu: Stop exporting free_iova_mem()
Browse files Browse the repository at this point in the history
It has no user outside iova.c

Signed-off-by: John Garry <john.garry@huawei.com>
Link: https://lore.kernel.org/r/1607020492-189471-4-git-send-email-john.garry@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
  • Loading branch information
John Garry authored and Will Deacon committed Dec 8, 2020
1 parent 51b70b8 commit 176cfc1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
3 changes: 1 addition & 2 deletions drivers/iommu/iova.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,11 @@ static struct iova *alloc_iova_mem(void)
return kmem_cache_zalloc(iova_cache, GFP_ATOMIC | __GFP_NOWARN);
}

void free_iova_mem(struct iova *iova)
static void free_iova_mem(struct iova *iova)
{
if (iova->pfn_lo != IOVA_ANCHOR)
kmem_cache_free(iova_cache, iova);
}
EXPORT_SYMBOL(free_iova_mem);

int iova_cache_get(void)
{
Expand Down
5 changes: 0 additions & 5 deletions include/linux/iova.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ static inline unsigned long iova_pfn(struct iova_domain *iovad, dma_addr_t iova)
int iova_cache_get(void);
void iova_cache_put(void);

void free_iova_mem(struct iova *iova);
void free_iova(struct iova_domain *iovad, unsigned long pfn);
void __free_iova(struct iova_domain *iovad, struct iova *iova);
struct iova *alloc_iova(struct iova_domain *iovad, unsigned long size,
Expand Down Expand Up @@ -170,10 +169,6 @@ static inline void iova_cache_put(void)
{
}

static inline void free_iova_mem(struct iova *iova)
{
}

static inline void free_iova(struct iova_domain *iovad, unsigned long pfn)
{
}
Expand Down

0 comments on commit 176cfc1

Please sign in to comment.