Skip to content

Commit 27bc9f7

Browse files
jgunthorpejoergroedel
authored andcommitted
iommu/pages: Remove iommu_put_pages_list_old and the _Generic
Nothing uses the old list_head path now, remove it. Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Tested-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/12-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 868240c commit 27bc9f7

2 files changed

Lines changed: 4 additions & 19 deletions

File tree

drivers/iommu/iommu-pages.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,25 +67,16 @@ void iommu_free_pages(void *virt)
6767
EXPORT_SYMBOL_GPL(iommu_free_pages);
6868

6969
/**
70-
* iommu_put_pages_list_new - free a list of pages.
70+
* iommu_put_pages_list - free a list of pages.
7171
* @list: The list of pages to be freed
7272
*
7373
* Frees a list of pages allocated by iommu_alloc_pages_node().
7474
*/
75-
void iommu_put_pages_list_new(struct iommu_pages_list *list)
75+
void iommu_put_pages_list(struct iommu_pages_list *list)
7676
{
7777
struct page *p, *tmp;
7878

7979
list_for_each_entry_safe(p, tmp, &list->pages, lru)
8080
__iommu_free_page(p);
8181
}
82-
EXPORT_SYMBOL_GPL(iommu_put_pages_list_new);
83-
84-
void iommu_put_pages_list_old(struct list_head *head)
85-
{
86-
struct page *p, *tmp;
87-
88-
list_for_each_entry_safe(p, tmp, head, lru)
89-
__iommu_free_page(p);
90-
}
91-
EXPORT_SYMBOL_GPL(iommu_put_pages_list_old);
82+
EXPORT_SYMBOL_GPL(iommu_put_pages_list);

drivers/iommu/iommu-pages.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,7 @@
1111

1212
void *iommu_alloc_pages_node(int nid, gfp_t gfp, unsigned int order);
1313
void iommu_free_pages(void *virt);
14-
void iommu_put_pages_list_new(struct iommu_pages_list *list);
15-
void iommu_put_pages_list_old(struct list_head *head);
16-
17-
#define iommu_put_pages_list(head) \
18-
_Generic(head, \
19-
struct iommu_pages_list *: iommu_put_pages_list_new, \
20-
struct list_head *: iommu_put_pages_list_old)(head)
14+
void iommu_put_pages_list(struct iommu_pages_list *list);
2115

2216
/**
2317
* iommu_pages_list_add - add the page to a iommu_pages_list

0 commit comments

Comments
 (0)