linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/panfrost: Remove set but not used variable 'bo'
@ 2020-02-03 15:27 YueHaibing
  2020-02-03 15:41 ` Steven Price
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: YueHaibing @ 2020-02-03 15:27 UTC (permalink / raw)
  To: Rob Herring, Boris Brezillon, Tomeu Vizoso, Steven Price,
	Alyssa Rosenzweig, David Airlie, Daniel Vetter, Sumit Semwal
  Cc: YueHaibing, dri-devel, linux-media, linaro-mm-sig,
	kernel-janitors, Hulk Robot

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

drivers/gpu/drm/panfrost/panfrost_job.c: In function 'panfrost_job_cleanup':
drivers/gpu/drm/panfrost/panfrost_job.c:278:31: warning:
 variable 'bo' set but not used [-Wunused-but-set-variable]

commit bdefca2d8dc0 ("drm/panfrost: Add the panfrost_gem_mapping concept")
involved this unused variable.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/panfrost/panfrost_job.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c
index 7c36ec675b73..ccb8546a9342 100644
--- a/drivers/gpu/drm/panfrost/panfrost_job.c
+++ b/drivers/gpu/drm/panfrost/panfrost_job.c
@@ -275,12 +275,8 @@ static void panfrost_job_cleanup(struct kref *ref)
 	}
 
 	if (job->bos) {
-		struct panfrost_gem_object *bo;
-
-		for (i = 0; i < job->bo_count; i++) {
-			bo = to_panfrost_bo(job->bos[i]);
+		for (i = 0; i < job->bo_count; i++)
 			drm_gem_object_put_unlocked(job->bos[i]);
-		}
 
 		kvfree(job->bos);
 	}




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

* Re: [PATCH -next] drm/panfrost: Remove set but not used variable 'bo'
  2020-02-03 15:27 [PATCH -next] drm/panfrost: Remove set but not used variable 'bo' YueHaibing
@ 2020-02-03 15:41 ` Steven Price
  2020-02-03 19:12 ` Alyssa Rosenzweig
  2020-02-12 20:33 ` Rob Herring
  2 siblings, 0 replies; 4+ messages in thread
From: Steven Price @ 2020-02-03 15:41 UTC (permalink / raw)
  To: YueHaibing
  Cc: Rob Herring, Boris Brezillon, Tomeu Vizoso, Alyssa Rosenzweig,
	David Airlie, Daniel Vetter, Sumit Semwal, dri-devel,
	linux-media, linaro-mm-sig, kernel-janitors, Hulk Robot

On Mon, Feb 03, 2020 at 03:27:24PM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/gpu/drm/panfrost/panfrost_job.c: In function 'panfrost_job_cleanup':
> drivers/gpu/drm/panfrost/panfrost_job.c:278:31: warning:
>  variable 'bo' set but not used [-Wunused-but-set-variable]
> 
> commit bdefca2d8dc0 ("drm/panfrost: Add the panfrost_gem_mapping concept")
> involved this unused variable.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

I'm not sure how I didn't spot that before! Thanks for fixing it.

Note commit bdefca2d8dc0 is actually in v5.5 and not (yet) in
drm-misc-next.

Reviewed-by: Steven Price <steven.price@arm.com>

> ---
>  drivers/gpu/drm/panfrost/panfrost_job.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c
> index 7c36ec675b73..ccb8546a9342 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_job.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_job.c
> @@ -275,12 +275,8 @@ static void panfrost_job_cleanup(struct kref *ref)
>  	}
>  
>  	if (job->bos) {
> -		struct panfrost_gem_object *bo;
> -
> -		for (i = 0; i < job->bo_count; i++) {
> -			bo = to_panfrost_bo(job->bos[i]);
> +		for (i = 0; i < job->bo_count; i++)
>  			drm_gem_object_put_unlocked(job->bos[i]);
> -		}
>  
>  		kvfree(job->bos);
>  	}
> 
> 
> 

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

* Re: [PATCH -next] drm/panfrost: Remove set but not used variable 'bo'
  2020-02-03 15:27 [PATCH -next] drm/panfrost: Remove set but not used variable 'bo' YueHaibing
  2020-02-03 15:41 ` Steven Price
@ 2020-02-03 19:12 ` Alyssa Rosenzweig
  2020-02-12 20:33 ` Rob Herring
  2 siblings, 0 replies; 4+ messages in thread
From: Alyssa Rosenzweig @ 2020-02-03 19:12 UTC (permalink / raw)
  To: YueHaibing
  Cc: Rob Herring, Boris Brezillon, Tomeu Vizoso, Steven Price,
	David Airlie, Daniel Vetter, Sumit Semwal, dri-devel,
	linux-media, linaro-mm-sig, kernel-janitors, Hulk Robot

[-- Attachment #1: Type: text/plain, Size: 1359 bytes --]

Reviewed-by: Alyssas Rosenzweig <alyssa.rosenzweig@collabora.com>, thank
you!

On Mon, Feb 03, 2020 at 03:27:24PM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/gpu/drm/panfrost/panfrost_job.c: In function 'panfrost_job_cleanup':
> drivers/gpu/drm/panfrost/panfrost_job.c:278:31: warning:
>  variable 'bo' set but not used [-Wunused-but-set-variable]
> 
> commit bdefca2d8dc0 ("drm/panfrost: Add the panfrost_gem_mapping concept")
> involved this unused variable.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/gpu/drm/panfrost/panfrost_job.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c
> index 7c36ec675b73..ccb8546a9342 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_job.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_job.c
> @@ -275,12 +275,8 @@ static void panfrost_job_cleanup(struct kref *ref)
>  	}
>  
>  	if (job->bos) {
> -		struct panfrost_gem_object *bo;
> -
> -		for (i = 0; i < job->bo_count; i++) {
> -			bo = to_panfrost_bo(job->bos[i]);
> +		for (i = 0; i < job->bo_count; i++)
>  			drm_gem_object_put_unlocked(job->bos[i]);
> -		}
>  
>  		kvfree(job->bos);
>  	}
> 
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH -next] drm/panfrost: Remove set but not used variable 'bo'
  2020-02-03 15:27 [PATCH -next] drm/panfrost: Remove set but not used variable 'bo' YueHaibing
  2020-02-03 15:41 ` Steven Price
  2020-02-03 19:12 ` Alyssa Rosenzweig
@ 2020-02-12 20:33 ` Rob Herring
  2 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2020-02-12 20:33 UTC (permalink / raw)
  To: YueHaibing
  Cc: Boris Brezillon, Tomeu Vizoso, Steven Price, Alyssa Rosenzweig,
	David Airlie, Daniel Vetter, Sumit Semwal, dri-devel,
	Linux Media Mailing List, linaro-mm-sig, kernel-janitors,
	Hulk Robot

On Mon, Feb 3, 2020 at 9:33 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/panfrost/panfrost_job.c: In function 'panfrost_job_cleanup':
> drivers/gpu/drm/panfrost/panfrost_job.c:278:31: warning:
>  variable 'bo' set but not used [-Wunused-but-set-variable]
>
> commit bdefca2d8dc0 ("drm/panfrost: Add the panfrost_gem_mapping concept")
> involved this unused variable.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/gpu/drm/panfrost/panfrost_job.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

Applied to drm-misc-fixes.

Rob

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

end of thread, other threads:[~2020-02-12 20:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-03 15:27 [PATCH -next] drm/panfrost: Remove set but not used variable 'bo' YueHaibing
2020-02-03 15:41 ` Steven Price
2020-02-03 19:12 ` Alyssa Rosenzweig
2020-02-12 20:33 ` Rob Herring

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