From: John Garry Date: Thu, 3 Dec 2020 18:34:51 +0000 (+0800) Subject: iommu: Stop exporting alloc_iova_mem() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=51b70b817b187e48155fc492adb9ce80bdb21b70;p=linux.git iommu: Stop exporting alloc_iova_mem() It is not used outside iova.c Signed-off-by: John Garry Link: https://lore.kernel.org/r/1607020492-189471-3-git-send-email-john.garry@huawei.com Signed-off-by: Will Deacon --- diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c index 3331c040b2b01..bb5cb67ee311f 100644 --- a/drivers/iommu/iova.c +++ b/drivers/iommu/iova.c @@ -243,11 +243,10 @@ static struct kmem_cache *iova_cache; static unsigned int iova_cache_users; static DEFINE_MUTEX(iova_cache_mutex); -struct iova *alloc_iova_mem(void) +static struct iova *alloc_iova_mem(void) { return kmem_cache_zalloc(iova_cache, GFP_ATOMIC | __GFP_NOWARN); } -EXPORT_SYMBOL(alloc_iova_mem); void free_iova_mem(struct iova *iova) { diff --git a/include/linux/iova.h b/include/linux/iova.h index a77add571c50c..d8c011b6d4edc 100644 --- a/include/linux/iova.h +++ b/include/linux/iova.h @@ -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); -struct iova *alloc_iova_mem(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); @@ -171,11 +170,6 @@ static inline void iova_cache_put(void) { } -static inline struct iova *alloc_iova_mem(void) -{ - return NULL; -} - static inline void free_iova_mem(struct iova *iova) { }