Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3032183img; Mon, 25 Mar 2019 02:16:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNU8rNBpcYxsXWACCAnVThgpKkgJdm/21qcz1RQq9AxGJ0xJh6zSUXZcksaiFCxMVqUCi2 X-Received: by 2002:a63:cc03:: with SMTP id x3mr22032169pgf.121.1553505362583; Mon, 25 Mar 2019 02:16:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553505362; cv=none; d=google.com; s=arc-20160816; b=TJ+F9Xyt60rkNvEI7I58/+OGNjo7vucHDupf/o6EP6Sdxgho3XYPivkPa0JhYc6vKQ 9g3aQc/ezWIsU3hyHu4qOBSpiw87RwVEPpdcJm1hWZul1GUI+6v9ZdfWy9FkG3n0xQTH xQpV6rW0HcyWExOtyxJh7K62VZVLk/clk2mjSuF2FlA4QxkYhMdSUpxYXHrL/M2ZJFFU 8ufatIO1b4VN/WE0TuVynGjhHgldKAjNFsudVY5cLuA2gTMFy5Ai2TsqS7Ex5m7reNYc QFScbULDYsENe52GKe1gnFlZ9WT/B4xGnS22Zfpd1faCWsLmLBMaFVLn3No7ZvJkS0nl mUpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ewed69DhjqGTSW1/qJw2wyEksQVF0o+PQCIJ1tb4Rkg=; b=MGQOlbtazwgcckw3SPi1fpLmq8IehnO+KFntzHsCVB3bGnIedfZ64Bkk/pXNAMD/s3 EITsMRJd9bnsOZRdc4PYVFRhMpgsbV7t3Lc/fX5WP0i1IxZJSfwkjDIA/9TZPJNUHIYE fl9RbFHHx5u54VdU1XPa6QgjOBawlEWfS7kFUEzcLnOC9V7ZmQZS6o7vB0+78fKOEpSe vu/01sEV3nkTzsZV8NQig1V9D2FtH4qu1fb+bQdJ6r4vR1LeTN0x7W6yPS2N6XfJZyUF /E6cPFxHkE/FxwVaeeO+m4qV4yCWqVyzUfxT5ly69oJ4agCu/0wJ2Jt8Rq1hkdIK6IAD 3XNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l65si13967527plb.338.2019.03.25.02.15.47; Mon, 25 Mar 2019 02:16:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730232AbfCYJOv (ORCPT + 99 others); Mon, 25 Mar 2019 05:14:51 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:34172 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730029AbfCYJOv (ORCPT ); Mon, 25 Mar 2019 05:14:51 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 60653C1FF2224E9A65D7; Mon, 25 Mar 2019 17:14:46 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.408.0; Mon, 25 Mar 2019 17:14:36 +0800 From: YueHaibing To: David Airlie , Gerd Hoffmann , "Daniel Vetter" CC: YueHaibing , , , , Subject: [PATCH v2 -next] drm/virtio: remove set but not used variable 'vgdev' Date: Mon, 25 Mar 2019 09:26:31 +0000 Message-ID: <20190325092631.152060-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190320020308.12745-1-yuehaibing@huawei.com> References: <20190320020308.12745-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/virtio/virtgpu_ttm.c: In function 'virtio_gpu_init_mem_type': drivers/gpu/drm/virtio/virtgpu_ttm.c:117:28: warning: variable 'vgdev' set but not used [-Wunused-but-set-variable] drivers/gpu/drm/virtio/virtgpu_ttm.c: In function 'virtio_gpu_bo_swap_notify': drivers/gpu/drm/virtio/virtgpu_ttm.c:300:28: warning: variable 'vgdev' set but not used [-Wunused-but-set-variable] It is never used since introduction in dc5698e80cf7 ("Add virtio gpu driver.") Signed-off-by: YueHaibing --- v2: fix patch prefix --- drivers/gpu/drm/virtio/virtgpu_ttm.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_ttm.c b/drivers/gpu/drm/virtio/virtgpu_ttm.c index d6225ba20b30..eb007c2569d8 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ttm.c +++ b/drivers/gpu/drm/virtio/virtgpu_ttm.c @@ -114,10 +114,6 @@ static const struct ttm_mem_type_manager_func virtio_gpu_bo_manager_func = { static int virtio_gpu_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, struct ttm_mem_type_manager *man) { - struct virtio_gpu_device *vgdev; - - vgdev = virtio_gpu_get_vgdev(bdev); - switch (type) { case TTM_PL_SYSTEM: /* System memory */ @@ -297,10 +293,8 @@ static void virtio_gpu_bo_move_notify(struct ttm_buffer_object *tbo, static void virtio_gpu_bo_swap_notify(struct ttm_buffer_object *tbo) { struct virtio_gpu_object *bo; - struct virtio_gpu_device *vgdev; bo = container_of(tbo, struct virtio_gpu_object, tbo); - vgdev = (struct virtio_gpu_device *)bo->gem_base.dev->dev_private; if (bo->pages) virtio_gpu_object_free_sg_table(bo);