]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iommu/pages: Remove iommu_put_pages_list_old and the _Generic
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 8 Apr 2025 16:54:00 +0000 (13:54 -0300)
committerJoerg Roedel <jroedel@suse.de>
Thu, 17 Apr 2025 14:22:43 +0000 (16:22 +0200)
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>
drivers/iommu/iommu-pages.c
drivers/iommu/iommu-pages.h

index af8694b46417fab93200f73a29d0d069e5831753..6eacb6a34586a647daa28abda82a95cdc1be0d76 100644 (file)
@@ -67,25 +67,16 @@ void iommu_free_pages(void *virt)
 EXPORT_SYMBOL_GPL(iommu_free_pages);
 
 /**
- * iommu_put_pages_list_new - free a list of pages.
+ * iommu_put_pages_list - free a list of pages.
  * @list: The list of pages to be freed
  *
  * Frees a list of pages allocated by iommu_alloc_pages_node().
  */
-void iommu_put_pages_list_new(struct iommu_pages_list *list)
+void iommu_put_pages_list(struct iommu_pages_list *list)
 {
        struct page *p, *tmp;
 
        list_for_each_entry_safe(p, tmp, &list->pages, lru)
                __iommu_free_page(p);
 }
-EXPORT_SYMBOL_GPL(iommu_put_pages_list_new);
-
-void iommu_put_pages_list_old(struct list_head *head)
-{
-       struct page *p, *tmp;
-
-       list_for_each_entry_safe(p, tmp, head, lru)
-               __iommu_free_page(p);
-}
-EXPORT_SYMBOL_GPL(iommu_put_pages_list_old);
+EXPORT_SYMBOL_GPL(iommu_put_pages_list);
index 0acc26af7202df38e43ea817066fb2e8dc2a84af..8dc0202bf108e465d7566e64cb59e47a93073444 100644 (file)
 
 void *iommu_alloc_pages_node(int nid, gfp_t gfp, unsigned int order);
 void iommu_free_pages(void *virt);
-void iommu_put_pages_list_new(struct iommu_pages_list *list);
-void iommu_put_pages_list_old(struct list_head *head);
-
-#define iommu_put_pages_list(head)                                   \
-       _Generic(head,                                               \
-               struct iommu_pages_list *: iommu_put_pages_list_new, \
-               struct list_head *: iommu_put_pages_list_old)(head)
+void iommu_put_pages_list(struct iommu_pages_list *list);
 
 /**
  * iommu_pages_list_add - add the page to a iommu_pages_list