kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: delete shadow "ret" variable
@ 2022-01-27  8:51 Dan Carpenter
  2022-01-27 22:26 ` [Intel-gfx] " Rodrigo Vivi
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2022-01-27  8:51 UTC (permalink / raw)
  To: Jani Nikula, Thomas Hellström
  Cc: Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin, David Airlie,
	Daniel Vetter, intel-gfx, kernel-janitors

This "ret" declaration shadows an existing "ret" variable at the top of
the function.  Delete it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/gpu/drm/i915/i915_vma.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 0026e85a0a0d..b66591d6e436 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -505,8 +505,6 @@ int i915_vma_bind(struct i915_vma *vma,
 			work->pinned = i915_gem_object_get(vma->obj);
 	} else {
 		if (vma->obj) {
-			int ret;
-
 			ret = i915_gem_object_wait_moving_fence(vma->obj, true);
 			if (ret) {
 				i915_vma_resource_free(vma->resource);
-- 
2.20.1


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

* Re: [Intel-gfx] [PATCH] drm/i915: delete shadow "ret" variable
  2022-01-27  8:51 [PATCH] drm/i915: delete shadow "ret" variable Dan Carpenter
@ 2022-01-27 22:26 ` Rodrigo Vivi
  2022-01-28  6:20   ` Thomas Hellström
  0 siblings, 1 reply; 5+ messages in thread
From: Rodrigo Vivi @ 2022-01-27 22:26 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Jani Nikula, Thomas Hellström, David Airlie, intel-gfx,
	kernel-janitors

On Thu, Jan 27, 2022 at 11:51:15AM +0300, Dan Carpenter wrote:
> This "ret" declaration shadows an existing "ret" variable at the top of
> the function.  Delete it.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

and pushing right now

> ---
>  drivers/gpu/drm/i915/i915_vma.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
> index 0026e85a0a0d..b66591d6e436 100644
> --- a/drivers/gpu/drm/i915/i915_vma.c
> +++ b/drivers/gpu/drm/i915/i915_vma.c
> @@ -505,8 +505,6 @@ int i915_vma_bind(struct i915_vma *vma,
>  			work->pinned = i915_gem_object_get(vma->obj);
>  	} else {
>  		if (vma->obj) {
> -			int ret;
> -
>  			ret = i915_gem_object_wait_moving_fence(vma->obj, true);
>  			if (ret) {
>  				i915_vma_resource_free(vma->resource);
> -- 
> 2.20.1
> 

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

* Re: [Intel-gfx] [PATCH] drm/i915: delete shadow "ret" variable
  2022-01-27 22:26 ` [Intel-gfx] " Rodrigo Vivi
@ 2022-01-28  6:20   ` Thomas Hellström
  2022-01-28  6:36     ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Hellström @ 2022-01-28  6:20 UTC (permalink / raw)
  To: Rodrigo Vivi, Dan Carpenter
  Cc: Jani Nikula, David Airlie, intel-gfx, kernel-janitors

On Thu, 2022-01-27 at 17:26 -0500, Rodrigo Vivi wrote:
> On Thu, Jan 27, 2022 at 11:51:15AM +0300, Dan Carpenter wrote:
> > This "ret" declaration shadows an existing "ret" variable at the
> > top of
> > the function.  Delete it.
> > 
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> 
> and pushing right now

Should probably have had a Fixes: tag on this one. I'm not 100% sure
whether the faulty patch is already upstream. In that case we might
need to manually include it in a -fixes pull.

/Thomas


> 
> > ---
> >  drivers/gpu/drm/i915/i915_vma.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_vma.c
> > b/drivers/gpu/drm/i915/i915_vma.c
> > index 0026e85a0a0d..b66591d6e436 100644
> > --- a/drivers/gpu/drm/i915/i915_vma.c
> > +++ b/drivers/gpu/drm/i915/i915_vma.c
> > @@ -505,8 +505,6 @@ int i915_vma_bind(struct i915_vma *vma,
> >                         work->pinned = i915_gem_object_get(vma-
> > >obj);
> >         } else {
> >                 if (vma->obj) {
> > -                       int ret;
> > -
> >                         ret =
> > i915_gem_object_wait_moving_fence(vma->obj, true);
> >                         if (ret) {
> >                                 i915_vma_resource_free(vma-
> > >resource);
> > -- 
> > 2.20.1
> > 



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

* Re: [Intel-gfx] [PATCH] drm/i915: delete shadow "ret" variable
  2022-01-28  6:20   ` Thomas Hellström
@ 2022-01-28  6:36     ` Dan Carpenter
  2022-01-28 13:50       ` Vivi, Rodrigo
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2022-01-28  6:36 UTC (permalink / raw)
  To: Thomas Hellström
  Cc: Rodrigo Vivi, Jani Nikula, David Airlie, intel-gfx,
	kernel-janitors

On Fri, Jan 28, 2022 at 07:20:02AM +0100, Thomas Hellström wrote:
> On Thu, 2022-01-27 at 17:26 -0500, Rodrigo Vivi wrote:
> > On Thu, Jan 27, 2022 at 11:51:15AM +0300, Dan Carpenter wrote:
> > > This "ret" declaration shadows an existing "ret" variable at the
> > > top of
> > > the function.  Delete it.
> > > 
> > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > 
> > and pushing right now
> 
> Should probably have had a Fixes: tag on this one. I'm not 100% sure
> whether the faulty patch is already upstream. In that case we might
> need to manually include it in a -fixes pull.
> 

It's not really a bug.  It's just a Sparse warning which is disabled
by default (-Wshadow).  The patch is in linux-next.

Fixes: 2f6b90da9192 ("drm/i915: Use vma resources for async unbinding")

regards,
dan carpenter


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

* Re: [Intel-gfx] [PATCH] drm/i915: delete shadow "ret" variable
  2022-01-28  6:36     ` Dan Carpenter
@ 2022-01-28 13:50       ` Vivi, Rodrigo
  0 siblings, 0 replies; 5+ messages in thread
From: Vivi, Rodrigo @ 2022-01-28 13:50 UTC (permalink / raw)
  To: dan.carpenter@oracle.com, thomas.hellstrom@linux.intel.com
  Cc: airlied@linux.ie, intel-gfx@lists.freedesktop.org,
	jani.nikula@linux.intel.com, kernel-janitors@vger.kernel.org

On Fri, 2022-01-28 at 09:36 +0300, Dan Carpenter wrote:
> On Fri, Jan 28, 2022 at 07:20:02AM +0100, Thomas Hellström wrote:
> > On Thu, 2022-01-27 at 17:26 -0500, Rodrigo Vivi wrote:
> > > On Thu, Jan 27, 2022 at 11:51:15AM +0300, Dan Carpenter wrote:
> > > > This "ret" declaration shadows an existing "ret" variable at
> > > > the
> > > > top of
> > > > the function.  Delete it.
> > > > 
> > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > 
> > > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > 
> > > and pushing right now
> > 
> > Should probably have had a Fixes: tag on this one. I'm not 100%

Well, I had added while pushing yesterday... but...

> > sure
> > whether the faulty patch is already upstream. In that case we might
> > need to manually include it in a -fixes pull.
> > 
> 
> It's not really a bug.  It's just a Sparse warning which is disabled
> by default (-Wshadow).  The patch is in linux-next.

Yeap, but it is good to add Fixes so if anyone is backporting the other
patch it is clear that this patch is a good addition on top.

> 
> Fixes: 2f6b90da9192 ("drm/i915: Use vma resources for async
> unbinding")

hmm... you are right... this one was the one...

I had added

Fixes: f6c466b84cfa ("drm/i915: Add support for moving fence waiting")

pointing to the original patch that introduced this int ret 
instead of the one that created the duplication...

so my Fixes addition can actually break some backport out there...
But luckily I believe that these 2 patches will be backported together
anyway...

Sorry about the confusion,
Rodrigo.


> 
> regards,
> dan carpenter
> 


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

end of thread, other threads:[~2022-01-28 13:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-27  8:51 [PATCH] drm/i915: delete shadow "ret" variable Dan Carpenter
2022-01-27 22:26 ` [Intel-gfx] " Rodrigo Vivi
2022-01-28  6:20   ` Thomas Hellström
2022-01-28  6:36     ` Dan Carpenter
2022-01-28 13:50       ` Vivi, Rodrigo

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