linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/ttm: remove set but not used variable 'driver'
@ 2018-11-08  2:15 YueHaibing
  2018-11-08  2:17 ` Zhang, Jerry(Junwei)
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: YueHaibing @ 2018-11-08  2:15 UTC (permalink / raw)
  To: Christian Koenig, Huang Rui, Junwei Zhang, David Airlie
  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: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 <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 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);




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

* Re: [PATCH -next] drm/ttm: remove set but not used variable 'driver'
  2018-11-08  2:15 [PATCH -next] drm/ttm: remove set but not used variable 'driver' YueHaibing
@ 2018-11-08  2:17 ` Zhang, Jerry(Junwei)
  2018-11-08  6:11 ` Huang, Ray
  2018-11-08  8:17 ` Koenig, Christian
  2 siblings, 0 replies; 4+ messages in thread
From: Zhang, Jerry(Junwei) @ 2018-11-08  2:17 UTC (permalink / raw)
  To: YueHaibing, Christian Koenig, Huang Rui, David Airlie
  Cc: dri-devel, linux-kernel, kernel-janitors

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 <yuehaibing@huawei.com>

Thanks.
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.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 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);
>
>
>


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

* RE: [PATCH -next] drm/ttm: remove set but not used variable 'driver'
  2018-11-08  2:15 [PATCH -next] drm/ttm: remove set but not used variable 'driver' YueHaibing
  2018-11-08  2:17 ` Zhang, Jerry(Junwei)
@ 2018-11-08  6:11 ` Huang, Ray
  2018-11-08  8:17 ` Koenig, Christian
  2 siblings, 0 replies; 4+ messages in thread
From: Huang, Ray @ 2018-11-08  6:11 UTC (permalink / raw)
  To: YueHaibing, Koenig, Christian, Zhang, Jerry, David Airlie
  Cc: dri-devel, linux-kernel, kernel-janitors

> -----Original Message-----
> From: YueHaibing [mailto:yuehaibing@huawei.com]
> Sent: Thursday, November 08, 2018 10:15 AM
> To: Koenig, Christian <Christian.Koenig@amd.com>; Huang, Ray
> <Ray.Huang@amd.com>; Zhang, Jerry <Jerry.Zhang@amd.com>; David Airlie
> <airlied@linux.ie>
> Cc: YueHaibing <yuehaibing@huawei.com>; dri-devel@lists.freedesktop.org;
> linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org
> 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 <yuehaibing@huawei.com>

Acked-by: Huang Rui <ray.huang@amd.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 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);
> 
> 


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

* Re: [PATCH -next] drm/ttm: remove set but not used variable 'driver'
  2018-11-08  2:15 [PATCH -next] drm/ttm: remove set but not used variable 'driver' YueHaibing
  2018-11-08  2:17 ` Zhang, Jerry(Junwei)
  2018-11-08  6:11 ` Huang, Ray
@ 2018-11-08  8:17 ` Koenig, Christian
  2 siblings, 0 replies; 4+ messages in thread
From: Koenig, Christian @ 2018-11-08  8:17 UTC (permalink / raw)
  To: YueHaibing, Huang, Ray, Zhang, Jerry, David Airlie
  Cc: dri-devel, linux-kernel, kernel-janitors

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 <yuehaibing@huawei.com>

Reviewed-by: Christian König <christian.koenig@amd.com> 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);
>
>
>


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

end of thread, other threads:[~2018-11-08  8:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-08  2:15 [PATCH -next] drm/ttm: remove set but not used variable 'driver' YueHaibing
2018-11-08  2:17 ` Zhang, Jerry(Junwei)
2018-11-08  6:11 ` Huang, Ray
2018-11-08  8:17 ` Koenig, Christian

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