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:190:24: warning:
variable 'driver' set but not used [-Wunused-but-set-variable]
It not used any more after
commit f2c24b83ae90 ("drm/ttm: flip the switch, and convert to dma_fence")
Signed-off-by: YueHaibing <[email protected]>
---
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 e493edb..efa005a 100644
--- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c
+++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
@@ -187,14 +187,12 @@ void ttm_eu_fence_buffer_objects(struct ww_acquire_ctx *ticket,
struct ttm_buffer_object *bo;
struct ttm_bo_global *glob;
struct ttm_bo_device *bdev;
- struct ttm_bo_driver *driver;
if (list_empty(list))
return;
bo = list_first_entry(list, struct ttm_validate_buffer, head)->bo;
bdev = bo->bdev;
- driver = bdev->driver;
glob = bo->bdev->glob;
spin_lock(&glob->lru_lock);
On 11/8/18 10:15 AM, YueHaibing 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:190:24: warning:
> variable 'driver' set but not used [-Wunused-but-set-variable]
>
> It not used any more after
> commit f2c24b83ae90 ("drm/ttm: flip the switch, and convert to dma_fence")
>
> Signed-off-by: YueHaibing <[email protected]>
Thanks.
Reviewed-by: Junwei Zhang <[email protected]>
> ---
> 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 e493edb..efa005a 100644
> --- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> +++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> @@ -187,14 +187,12 @@ void ttm_eu_fence_buffer_objects(struct ww_acquire_ctx *ticket,
> struct ttm_buffer_object *bo;
> struct ttm_bo_global *glob;
> struct ttm_bo_device *bdev;
> - struct ttm_bo_driver *driver;
>
> if (list_empty(list))
> return;
>
> bo = list_first_entry(list, struct ttm_validate_buffer, head)->bo;
> bdev = bo->bdev;
> - driver = bdev->driver;
> glob = bo->bdev->glob;
>
> spin_lock(&glob->lru_lock);
>
>
>
> -----Original Message-----
> From: YueHaibing [mailto:[email protected]]
> Sent: Thursday, November 08, 2018 10:15 AM
> To: Koenig, Christian <[email protected]>; Huang, Ray
> <[email protected]>; Zhang, Jerry <[email protected]>; David Airlie
> <[email protected]>
> Cc: YueHaibing <[email protected]>; [email protected];
> [email protected]; [email protected]
> Subject: [PATCH -next] drm/ttm: remove set but not used variable 'driver'
>
> 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:190:24: warning:
> variable 'driver' set but not used [-Wunused-but-set-variable]
>
> It not used any more after
> commit f2c24b83ae90 ("drm/ttm: flip the switch, and convert to dma_fence")
>
> Signed-off-by: YueHaibing <[email protected]>
Acked-by: Huang Rui <[email protected]>
> ---
> 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 e493edb..efa005a 100644
> --- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> +++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> @@ -187,14 +187,12 @@ void ttm_eu_fence_buffer_objects(struct
> ww_acquire_ctx *ticket,
> struct ttm_buffer_object *bo;
> struct ttm_bo_global *glob;
> struct ttm_bo_device *bdev;
> - struct ttm_bo_driver *driver;
>
> if (list_empty(list))
> return;
>
> bo = list_first_entry(list, struct ttm_validate_buffer, head)->bo;
> bdev = bo->bdev;
> - driver = bdev->driver;
> glob = bo->bdev->glob;
>
> spin_lock(&glob->lru_lock);
>
>
Am 08.11.18 um 03:15 schrieb YueHaibing:
> 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:190:24: warning:
> variable 'driver' set but not used [-Wunused-but-set-variable]
>
> It not used any more after
> commit f2c24b83ae90 ("drm/ttm: flip the switch, and convert to dma_fence")
>
> Signed-off-by: YueHaibing <[email protected]>
Reviewed-by: Christian König <[email protected]> and going to
push it into our internal branch for upstreaming.
> ---
> 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 e493edb..efa005a 100644
> --- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> +++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> @@ -187,14 +187,12 @@ void ttm_eu_fence_buffer_objects(struct ww_acquire_ctx *ticket,
> struct ttm_buffer_object *bo;
> struct ttm_bo_global *glob;
> struct ttm_bo_device *bdev;
> - struct ttm_bo_driver *driver;
>
> if (list_empty(list))
> return;
>
> bo = list_first_entry(list, struct ttm_validate_buffer, head)->bo;
> bdev = bo->bdev;
> - driver = bdev->driver;
> glob = bo->bdev->glob;
>
> spin_lock(&glob->lru_lock);
>
>
>