diff mbox series

[01/45] drm/qxl: drop unused code

Message ID 20200924051845.397177-2-airlied@gmail.com (mailing list archive)
State New, archived
Headers show
Series TTM move refactoring | expand

Commit Message

Dave Airlie Sept. 24, 2020, 5:18 a.m. UTC
From: Dave Airlie <airlied@redhat.com>

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/qxl/qxl_ttm.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Christian König Sept. 24, 2020, 10:23 a.m. UTC | #1
Am 24.09.20 um 07:18 schrieb Dave Airlie:
> From: Dave Airlie <airlied@redhat.com>
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> ---
>   drivers/gpu/drm/qxl/qxl_ttm.c | 8 --------
>   1 file changed, 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
> index 2c35ca4270c6..5738be300078 100644
> --- a/drivers/gpu/drm/qxl/qxl_ttm.c
> +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
> @@ -100,17 +100,12 @@ int qxl_ttm_io_mem_reserve(struct ttm_bo_device *bdev,
>    */
>   struct qxl_ttm_tt {
>   	struct ttm_tt		        ttm;
> -	struct qxl_device		*qdev;
> -	u64				offset;
>   };

Any reason we keep the qxl_ttm_tt structure around when it only contains 
the ttm_tt field?

Christian.

>   
>   static int qxl_ttm_backend_bind(struct ttm_bo_device *bdev,
>   				struct ttm_tt *ttm,
>   				struct ttm_resource *bo_mem)
>   {
> -	struct qxl_ttm_tt *gtt = (void *)ttm;
> -
> -	gtt->offset = (unsigned long)(bo_mem->start << PAGE_SHIFT);
>   	if (!ttm->num_pages) {
>   		WARN(1, "nothing to bind %lu pages for mreg %p back %p!\n",
>   		     ttm->num_pages, bo_mem, ttm);
> @@ -138,14 +133,11 @@ static void qxl_ttm_backend_destroy(struct ttm_bo_device *bdev,
>   static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
>   					uint32_t page_flags)
>   {
> -	struct qxl_device *qdev;
>   	struct qxl_ttm_tt *gtt;
>   
> -	qdev = qxl_get_qdev(bo->bdev);
>   	gtt = kzalloc(sizeof(struct qxl_ttm_tt), GFP_KERNEL);
>   	if (gtt == NULL)
>   		return NULL;
> -	gtt->qdev = qdev;
>   	if (ttm_tt_init(&gtt->ttm, bo, page_flags)) {
>   		kfree(gtt);
>   		return NULL;
diff mbox series

Patch

diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
index 2c35ca4270c6..5738be300078 100644
--- a/drivers/gpu/drm/qxl/qxl_ttm.c
+++ b/drivers/gpu/drm/qxl/qxl_ttm.c
@@ -100,17 +100,12 @@  int qxl_ttm_io_mem_reserve(struct ttm_bo_device *bdev,
  */
 struct qxl_ttm_tt {
 	struct ttm_tt		        ttm;
-	struct qxl_device		*qdev;
-	u64				offset;
 };
 
 static int qxl_ttm_backend_bind(struct ttm_bo_device *bdev,
 				struct ttm_tt *ttm,
 				struct ttm_resource *bo_mem)
 {
-	struct qxl_ttm_tt *gtt = (void *)ttm;
-
-	gtt->offset = (unsigned long)(bo_mem->start << PAGE_SHIFT);
 	if (!ttm->num_pages) {
 		WARN(1, "nothing to bind %lu pages for mreg %p back %p!\n",
 		     ttm->num_pages, bo_mem, ttm);
@@ -138,14 +133,11 @@  static void qxl_ttm_backend_destroy(struct ttm_bo_device *bdev,
 static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
 					uint32_t page_flags)
 {
-	struct qxl_device *qdev;
 	struct qxl_ttm_tt *gtt;
 
-	qdev = qxl_get_qdev(bo->bdev);
 	gtt = kzalloc(sizeof(struct qxl_ttm_tt), GFP_KERNEL);
 	if (gtt == NULL)
 		return NULL;
-	gtt->qdev = qdev;
 	if (ttm_tt_init(&gtt->ttm, bo, page_flags)) {
 		kfree(gtt);
 		return NULL;