linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/ttm: remove set but not used variable 'bdev'
@ 2019-02-18 13:59 YueHaibing
  2019-02-28  2:41 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-02-18 13:59 UTC (permalink / raw)
  To: Christian Koenig, Huang Rui, Junwei Zhang, David Airlie, Daniel Vetter
  Cc: YueHaibing, dri-devel, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/ttm/ttm_execbuf_util.c: In function 'ttm_eu_fence_buffer_objects':
drivers/gpu/drm/ttm/ttm_execbuf_util.c:191:24: warning:
 variable 'bdev' set but not used [-Wunused-but-set-variable]

It's not used any more and can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/ttm/ttm_execbuf_util.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
index 93860346c426..0075eb9a0b52 100644
--- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c
+++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
@@ -188,13 +188,11 @@ void ttm_eu_fence_buffer_objects(struct ww_acquire_ctx *ticket,
 	struct ttm_validate_buffer *entry;
 	struct ttm_buffer_object *bo;
 	struct ttm_bo_global *glob;
-	struct ttm_bo_device *bdev;
 
 	if (list_empty(list))
 		return;
 
 	bo = list_first_entry(list, struct ttm_validate_buffer, head)->bo;
-	bdev = bo->bdev;
 	glob = bo->bdev->glob;
 
 	spin_lock(&glob->lru_lock);




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] drm/ttm: remove set but not used variable 'bdev'
  2019-02-18 13:59 [PATCH -next] drm/ttm: remove set but not used variable 'bdev' YueHaibing
@ 2019-02-28  2:41 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2019-02-28  2:41 UTC (permalink / raw)
  To: YueHaibing
  Cc: Christian Koenig, Huang Rui, Junwei Zhang, David Airlie,
	Daniel Vetter, kernel-janitors, LKML,
	Maling list - DRI developers

Applied.  Thanks!

On Tue, Feb 19, 2019 at 3:22 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/ttm/ttm_execbuf_util.c: In function 'ttm_eu_fence_buffer_objects':
> drivers/gpu/drm/ttm/ttm_execbuf_util.c:191:24: warning:
>  variable 'bdev' set but not used [-Wunused-but-set-variable]
>
> It's not used any more and can be removed.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/gpu/drm/ttm/ttm_execbuf_util.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> index 93860346c426..0075eb9a0b52 100644
> --- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> +++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> @@ -188,13 +188,11 @@ void ttm_eu_fence_buffer_objects(struct ww_acquire_ctx *ticket,
>         struct ttm_validate_buffer *entry;
>         struct ttm_buffer_object *bo;
>         struct ttm_bo_global *glob;
> -       struct ttm_bo_device *bdev;
>
>         if (list_empty(list))
>                 return;
>
>         bo = list_first_entry(list, struct ttm_validate_buffer, head)->bo;
> -       bdev = bo->bdev;
>         glob = bo->bdev->glob;
>
>         spin_lock(&glob->lru_lock);
>
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-28  2:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-18 13:59 [PATCH -next] drm/ttm: remove set but not used variable 'bdev' YueHaibing
2019-02-28  2:41 ` Alex Deucher

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).