From: Mukesh Ojha <mojha@codeaurora.org>
To: YueHaibing <yuehaibing@huawei.com>,
David Airlie <airlied@linux.ie>,
Gerd Hoffmann <kraxel@redhat.com>,
Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org,
virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2 -next] drm/virtio: remove set but not used variable 'vgdev'
Date: Wed, 27 Mar 2019 20:17:29 +0530 [thread overview]
Message-ID: <17e9a0c2-63dd-ac97-49c6-aa70b5c8d221@codeaurora.org> (raw)
In-Reply-To: <20190325092631.152060-1-yuehaibing@huawei.com>
On 3/25/2019 2:56 PM, 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 <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
-Mukesh
> ---
> 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);
>
>
>
next prev parent reply other threads:[~2019-03-27 14:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-20 2:03 [PATCH -next] drm/ttm: remove set but not used variable 'vgdev' YueHaibing
2019-03-25 9:02 ` Daniel Vetter
2019-03-25 9:11 ` YueHaibing
2019-03-25 9:26 ` [PATCH v2 -next] drm/virtio: " YueHaibing
2019-03-27 14:47 ` Mukesh Ojha [this message]
2019-03-28 10:32 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17e9a0c2-63dd-ac97-49c6-aa70b5c8d221@codeaurora.org \
--to=mojha@codeaurora.org \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).