]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/pagemap: Remove some dead code
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 19 Dec 2025 11:32:58 +0000 (12:32 +0100)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Tue, 23 Dec 2025 08:34:15 +0000 (09:34 +0100)
The page pointer can't be NULL.

v5:
- New patch. (Matt Brost)

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> # For merging through drm-xe.
Link: https://patch.msgid.link/20251219113320.183860-3-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/drm_pagemap.c

index 37d7cfbbb3e8a6c0403938c2625de27812810797..4cf8f54e5a27a42bec8f65d4154167e9fd2edc6c 100644 (file)
@@ -702,19 +702,6 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,
        if (!migrate.cpages)
                goto err_free;
 
-       if (!page) {
-               for (i = 0; i < npages; ++i) {
-                       if (!(migrate.src[i] & MIGRATE_PFN_MIGRATE))
-                               continue;
-
-                       page = migrate_pfn_to_page(migrate.src[i]);
-                       break;
-               }
-
-               if (!page)
-                       goto err_finalize;
-       }
-       zdd = page->zone_device_data;
        ops = zdd->devmem_allocation->ops;
        dev = zdd->devmem_allocation->dev;