Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3029776img; Mon, 25 Mar 2019 02:12:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzcwLxa5dJUnIuuzX3IIKG8WsIKPWR4T8wb/+PHSQbw5GC7RIwfMzGx8KCOb3ptBsKjGWlB X-Received: by 2002:a17:902:9884:: with SMTP id s4mr24163244plp.110.1553505149419; Mon, 25 Mar 2019 02:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553505149; cv=none; d=google.com; s=arc-20160816; b=weQZO1Kmctc6nL6Pwj+Yu/dC+hdDHSMw07NaGH2FB+QQRmEVNVqPh9MWFHWxoMm1XH i+spa61llWuSGHNBSeuk4JDP0N9V0Ljsji0f6qdO4Jdn+1b5dQdoEVqjZM5JRPg+vCM0 uua9d4c5/hM8v6KB005GdZMJ/HK5EUD/lMxYCf6Huar8flN9NFUnZf4AIfT6K+laqQUD NxM4gEriEB4wnPx1eE+lhCMuz+uwlLOC9aAGF/pQKcdiBK9o2nbF5PyOAeGZJzorp+fW Irgk9lq3OAZmNpHvp7UXYYxcV3hTWZfA1P5pG5IJQAoeu8a216Cf0BLh6AwlzdrDxjNS HECQ== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:to:subject; bh=454iZijsLuwDv9rxjyIay4ABoY2iZwgjvZ24wXW6MRU=; b=U4j4RaiGNCi75Dg2OTC6CDBJep+RNkYk+NZq7zx43VRoyiZUZk0iYrt4djEBZoGAAL OuAqhpI9iDGxO/gGeisPnnIzvJ3WikYpVPcnoCXdRJ3kdanQYfPC+EOFLdchu4o7m9pB M2RqCcT+xOTLwWEBbZCQRdeQJdKOKBgN4DouG95lI/77PaNgSkJOsBFMbnr4tfTLoaJT RKR553bVT1poSu+PkSIOIsKhUUkmJ6Y68yZaxt3HpZEQq56tXODAe5Uh2FQIJJ7nbWPd J1e7jHReRHw0S0tAvZjvl6ljq/Yt7yZqTnzZ8EJXBDytCwXb9djNPWYV4UOpaOpxqaPW xI3w== 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 i70si13595007pfj.236.2019.03.25.02.12.13; Mon, 25 Mar 2019 02:12:29 -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 S1730193AbfCYJLd (ORCPT + 99 others); Mon, 25 Mar 2019 05:11:33 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:59696 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730043AbfCYJLd (ORCPT ); Mon, 25 Mar 2019 05:11:33 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 7892B6F236C11058F3EC; Mon, 25 Mar 2019 17:11:27 +0800 (CST) Received: from [127.0.0.1] (10.177.31.96) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.408.0; Mon, 25 Mar 2019 17:11:23 +0800 Subject: Re: [PATCH -next] drm/ttm: remove set but not used variable 'vgdev' To: David Airlie , Gerd Hoffmann , , , , References: <20190320020308.12745-1-yuehaibing@huawei.com> <20190325090212.GE2665@phenom.ffwll.local> From: YueHaibing Message-ID: <2f723c57-fc9a-a4ee-271e-ff5d2f256fd3@huawei.com> Date: Mon, 25 Mar 2019 17:11:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20190325090212.GE2665@phenom.ffwll.local> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/3/25 17:02, Daniel Vetter wrote: > On Wed, Mar 20, 2019 at 02:03:08AM +0000, YueHaibing wrote: >> 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 > > Subject prefix should be drm/virtio: which is maybe the reason Gerd hasn't > spotted this yet. Thanks, will fix it. > -Daniel > >> --- >> 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); >> >> >> >