All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][next] drm/vmwgfx: remove redundant assignment to sub_res
@ 2019-06-24 22:44 ` Colin King
  0 siblings, 0 replies; 5+ messages in thread
From: Colin King @ 2019-06-24 22:44 UTC (permalink / raw)
  To: VMware Graphics, Thomas Hellstrom, David Airlie, Daniel Vetter,
	dri-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Variable sub_res is initialized to a value that is never read and it
is re-assigned later in a for-loop.  The initialization is redundant
and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
index 862ca44680ca..3257ba689d93 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
@@ -1914,7 +1914,7 @@ static void vmw_surface_tex_dirty_range_add(struct vmw_resource *res,
 	} else {
 		/* Dirty range covers multiple sub-resources */
 		struct svga3dsurface_loc loc_min, loc_max;
-		u32 sub_res = loc1.sub_resource;
+		u32 sub_res;
 
 		svga3dsurface_max_loc(cache, loc1.sub_resource, &loc_max);
 		vmw_subres_dirty_add(dirty, &loc1, &loc_max);
-- 
2.20.1


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

* [PATCH][next] drm/vmwgfx: remove redundant assignment to sub_res
@ 2019-06-24 22:44 ` Colin King
  0 siblings, 0 replies; 5+ messages in thread
From: Colin King @ 2019-06-24 22:44 UTC (permalink / raw)
  To: VMware Graphics, Thomas Hellstrom, David Airlie, Daniel Vetter,
	dri-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Variable sub_res is initialized to a value that is never read and it
is re-assigned later in a for-loop.  The initialization is redundant
and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
index 862ca44680ca..3257ba689d93 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
@@ -1914,7 +1914,7 @@ static void vmw_surface_tex_dirty_range_add(struct vmw_resource *res,
 	} else {
 		/* Dirty range covers multiple sub-resources */
 		struct svga3dsurface_loc loc_min, loc_max;
-		u32 sub_res = loc1.sub_resource;
+		u32 sub_res;
 
 		svga3dsurface_max_loc(cache, loc1.sub_resource, &loc_max);
 		vmw_subres_dirty_add(dirty, &loc1, &loc_max);
-- 
2.20.1

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

* [PATCH][next] drm/vmwgfx: remove redundant assignment to sub_res
@ 2019-06-24 22:44 ` Colin King
  0 siblings, 0 replies; 5+ messages in thread
From: Colin King @ 2019-06-24 22:44 UTC (permalink / raw)
  To: VMware Graphics, Thomas Hellstrom, David Airlie, Daniel Vetter,
	dri-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Variable sub_res is initialized to a value that is never read and it
is re-assigned later in a for-loop.  The initialization is redundant
and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
index 862ca44680ca..3257ba689d93 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
@@ -1914,7 +1914,7 @@ static void vmw_surface_tex_dirty_range_add(struct vmw_resource *res,
 	} else {
 		/* Dirty range covers multiple sub-resources */
 		struct svga3dsurface_loc loc_min, loc_max;
-		u32 sub_res = loc1.sub_resource;
+		u32 sub_res;
 
 		svga3dsurface_max_loc(cache, loc1.sub_resource, &loc_max);
 		vmw_subres_dirty_add(dirty, &loc1, &loc_max);
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH][next] drm/vmwgfx: remove redundant assignment to sub_res
  2019-06-24 22:44 ` Colin King
@ 2019-07-01 21:13   ` Deepak Singh Rawat
  -1 siblings, 0 replies; 5+ messages in thread
From: Deepak Singh Rawat @ 2019-07-01 21:13 UTC (permalink / raw)
  To: Colin King, Linux-graphics-maintainer, Thomas Hellstrom,
	David Airlie, Daniel Vetter, dri-devel
  Cc: kernel-janitors, linux-kernel

Hi Colin,

Reviewed-by: Deepak Rawat <drawat@vmware.com>

Thanks,
Deepak


On Mon, 2019-06-24 at 23:44 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable sub_res is initialized to a value that is never read and it
> is re-assigned later in a for-loop.  The initialization is redundant
> and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
> b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
> index 862ca44680ca..3257ba689d93 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
> @@ -1914,7 +1914,7 @@ static void
> vmw_surface_tex_dirty_range_add(struct vmw_resource *res,
>  	} else {
>  		/* Dirty range covers multiple sub-resources */
>  		struct svga3dsurface_loc loc_min, loc_max;
> -		u32 sub_res = loc1.sub_resource;
> +		u32 sub_res;
>  
>  		svga3dsurface_max_loc(cache, loc1.sub_resource,
> &loc_max);
>  		vmw_subres_dirty_add(dirty, &loc1, &loc_max);


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

* Re: [PATCH][next] drm/vmwgfx: remove redundant assignment to sub_res
@ 2019-07-01 21:13   ` Deepak Singh Rawat
  0 siblings, 0 replies; 5+ messages in thread
From: Deepak Singh Rawat @ 2019-07-01 21:13 UTC (permalink / raw)
  To: Colin King, Linux-graphics-maintainer, Thomas Hellstrom,
	David Airlie, Daniel Vetter, dri-devel
  Cc: kernel-janitors, linux-kernel

SGkgQ29saW4sDQoNClJldmlld2VkLWJ5OiBEZWVwYWsgUmF3YXQgPGRyYXdhdEB2bXdhcmUuY29t
Pg0KDQpUaGFua3MsDQpEZWVwYWsNCg0KDQpPbiBNb24sIDIwMTktMDYtMjQgYXQgMjM6NDQgKzAx
MDAsIENvbGluIEtpbmcgd3JvdGU6DQo+IEZyb206IENvbGluIElhbiBLaW5nIDxjb2xpbi5raW5n
QGNhbm9uaWNhbC5jb20+DQo+IA0KPiBWYXJpYWJsZSBzdWJfcmVzIGlzIGluaXRpYWxpemVkIHRv
IGEgdmFsdWUgdGhhdCBpcyBuZXZlciByZWFkIGFuZCBpdA0KPiBpcyByZS1hc3NpZ25lZCBsYXRl
ciBpbiBhIGZvci1sb29wLiAgVGhlIGluaXRpYWxpemF0aW9uIGlzIHJlZHVuZGFudA0KPiBhbmQg
Y2FuIGJlIHJlbW92ZWQuDQo+IA0KPiBBZGRyZXNzZXMtQ292ZXJpdHk6ICgiVW51c2VkIHZhbHVl
IikNCj4gU2lnbmVkLW9mZi1ieTogQ29saW4gSWFuIEtpbmcgPGNvbGluLmtpbmdAY2Fub25pY2Fs
LmNvbT4NCj4gLS0tDQo+ICBkcml2ZXJzL2dwdS9kcm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C | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 22:44 [PATCH][next] drm/vmwgfx: remove redundant assignment to sub_res Colin King
2019-06-24 22:44 ` Colin King
2019-06-24 22:44 ` Colin King
2019-07-01 21:13 ` Deepak Singh Rawat
2019-07-01 21:13   ` Deepak Singh Rawat

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.