--- initial
+++ final
@@ -1,138 +1,138 @@
 static int i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj) {
   struct drm_i915_private *dev_priv = to_i915(obj->base.dev);
   const unsigned long page_count = obj->base.size / PAGE_SIZE;
   unsigned long i;
   struct address_space *mapping;
   struct sg_table *st;
   struct scatterlist *sg;
   struct sgt_iter sgt_iter;
   struct page *page;
   unsigned long last_pfn = 0; /* suppress gcc warning */
   unsigned int max_segment = i915_sg_segment_size();
   unsigned int sg_page_sizes;
   gfp_t noreclaim;
   int ret;
   /* Assert that the object is not currently in any GPU domain. As it
    * wasn't in the GTT, there shouldn't be any way it could have been in
    * a GPU cache
    */
-  GEM_BUG_ON(obj->base.read_domains & I915_GEM_GPU_DOMAINS);
-  GEM_BUG_ON(obj->base.write_domain & I915_GEM_GPU_DOMAINS);
+  GEM_BUG_ON(obj->read_domains & I915_GEM_GPU_DOMAINS);
+  GEM_BUG_ON(obj->write_domain & I915_GEM_GPU_DOMAINS);
   st = kmalloc(sizeof(*st), GFP_KERNEL);
   if (st == NULL) return -ENOMEM;
 rebuild_st:
   if (sg_alloc_table(st, page_count, GFP_KERNEL)) {
     kfree(st);
     return -ENOMEM;
   }
   /* Get the list of pages out of our struct file.  They'll be pinned
    * at this point until we release them.
    *
    * Fail silently without starting the shrinker
    */
   mapping = obj->base.filp->f_mapping;
   noreclaim = mapping_gfp_constraint(mapping, ~__GFP_RECLAIM);
   noreclaim |= __GFP_NORETRY | __GFP_NOWARN;
   sg = st->sgl;
   st->nents = 0;
   sg_page_sizes = 0;
   for (i = 0; i < page_count; i++) {
     const unsigned int shrink[] =
         {
             I915_SHRINK_BOUND | I915_SHRINK_UNBOUND | I915_SHRINK_PURGEABLE,
             0,
         },
                        *s = shrink;
     gfp_t gfp = noreclaim;
     do {
       page = shmem_read_mapping_page_gfp(mapping, i, gfp);
       if (likely(!IS_ERR(page))) break;
       if (!*s) {
         ret = PTR_ERR(page);
         goto err_sg;
       }
       i915_gem_shrink(dev_priv, 2 * page_count, NULL, *s++);
       cond_resched();
       /* We've tried hard to allocate the memory by reaping
        * our own buffer, now let the real VM do its job and
        * go down in flames if truly OOM.
        *
        * However, since graphics tend to be disposable,
        * defer the oom here by reporting the ENOMEM back
        * to userspace.
        */
       if (!*s) {
         /* reclaim and warn, but no oom */
         gfp = mapping_gfp_mask(mapping);
         /* Our bo are always dirty and so we require
          * kswapd to reclaim our pages (direct reclaim
          * does not effectively begin pageout of our
          * buffers on its own). However, direct reclaim
          * only waits for kswapd when under allocation
          * congestion. So as a result __GFP_RECLAIM is
          * unreliable and fails to actually reclaim our
          * dirty pages -- unless you try over and over
          * again with !__GFP_NORETRY. However, we still
          * want to fail this allocation rather than
          * trigger the out-of-memory killer and for
          * this we want __GFP_RETRY_MAYFAIL.
          */
         gfp |= __GFP_RETRY_MAYFAIL;
       }
     } while (1);
     if (!i || sg->length >= max_segment || page_to_pfn(page) != last_pfn + 1) {
       if (i) {
         sg_page_sizes |= sg->length;
         sg = sg_next(sg);
       }
       st->nents++;
       sg_set_page(sg, page, PAGE_SIZE, 0);
     } else {
       sg->length += PAGE_SIZE;
     }
     last_pfn = page_to_pfn(page);
     /* Check that the i965g/gm workaround works. */
     WARN_ON((gfp & __GFP_DMA32) && (last_pfn >= 0x00100000UL));
   }
   if (sg) { /* loop terminated early; short sg table */
     sg_page_sizes |= sg->length;
     sg_mark_end(sg);
   }
   /* Trim unused sg entries to avoid wasting memory. */
   i915_sg_trim(st);
   ret = i915_gem_gtt_prepare_pages(obj, st);
   if (ret) {
     /* DMA remapping failed? One possible cause is that
      * it could not reserve enough large entries, asking
      * for PAGE_SIZE chunks instead may be helpful.
      */
     if (max_segment > PAGE_SIZE) {
       for_each_sgt_page(page, sgt_iter, st) put_page(page);
       sg_free_table(st);
       max_segment = PAGE_SIZE;
       goto rebuild_st;
     } else {
       dev_warn(&dev_priv->drm.pdev->dev, "Failed to DMA remap %lu pages\n", page_count);
       goto err_pages;
     }
   }
   if (i915_gem_object_needs_bit17_swizzle(obj)) i915_gem_object_do_bit_17_swizzle(obj, st);
   __i915_gem_object_set_pages(obj, st, sg_page_sizes);
   return 0;
 err_sg:
   sg_mark_end(sg);
 err_pages:
   for_each_sgt_page(page, sgt_iter, st) put_page(page);
   sg_free_table(st);
   kfree(st);
   /* shmemfs first checks if there is enough memory to allocate the page
    * and reports ENOSPC should there be insufficient, along with the usual
    * ENOMEM for a genuine allocation failure.
    *
    * We use ENOSPC in our driver to mean that we have run out of aperture
    * space and so want to translate the error from shmemfs back to our
    * usual understanding of ENOMEM.
    */
   if (ret == -ENOSPC) ret = -ENOMEM;
   return ret;
 }<sep>@@
struct drm_i915_gem_object *obj;
@@
- obj->base.read_domains
+ obj->read_domains

@@
struct drm_i915_gem_object *obj;
@@
- obj->base.write_domain
+ obj->write_domain