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

Christian König christian.koenig at amd.com
Thu Sep 24 10:23:27 UTC 2020


Am 24.09.20 um 07:18 schrieb Dave Airlie:
> From: Dave Airlie <airlied at redhat.com>
>
> Signed-off-by: Dave Airlie <airlied at 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;



More information about the dri-devel mailing list