drm/qxl: use to_qxl_bo macro
authorFrediano Ziglio <fziglio@redhat.com>
Tue, 15 Dec 2015 11:20:56 +0000 (12:20 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 15 Dec 2015 12:39:40 +0000 (13:39 +0100)
Instead of using container_of directly use to_qxl_bo macro.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1450178476-26284-9-git-send-email-boris.brezillon@free-electrons.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/qxl/qxl_object.c
drivers/gpu/drm/qxl/qxl_ttm.c

index b28370e014c6c0b1547c5d88378d4d161e80a935..5e1d7899dd7234fcac0bcf811ed6ac37f1cd9eff 100644 (file)
@@ -32,7 +32,7 @@ static void qxl_ttm_bo_destroy(struct ttm_buffer_object *tbo)
        struct qxl_bo *bo;
        struct qxl_device *qdev;
 
-       bo = container_of(tbo, struct qxl_bo, tbo);
+       bo = to_qxl_bo(tbo);
        qdev = (struct qxl_device *)bo->gem_base.dev->dev_private;
 
        qxl_surface_evict(qdev, bo, false);
index 0cbc4c9871643eb5da5cf210fc8b301dee912feb..953412766416f379e04a521f2c9f91a1078c8e12 100644 (file)
@@ -201,7 +201,7 @@ static void qxl_evict_flags(struct ttm_buffer_object *bo,
                placement->num_busy_placement = 1;
                return;
        }
-       qbo = container_of(bo, struct qxl_bo, tbo);
+       qbo = to_qxl_bo(bo);
        qxl_ttm_placement_from_domain(qbo, QXL_GEM_DOMAIN_CPU, false);
        *placement = qbo->placement;
 }
@@ -365,7 +365,7 @@ static void qxl_bo_move_notify(struct ttm_buffer_object *bo,
 
        if (!qxl_ttm_bo_is_qxl_bo(bo))
                return;
-       qbo = container_of(bo, struct qxl_bo, tbo);
+       qbo = to_qxl_bo(bo);
        qdev = qbo->gem_base.dev->dev_private;
 
        if (bo->mem.mem_type == TTM_PL_PRIV0 && qbo->surface_id)