Re: [Mesa-dev] [PATCH 2/2] svga: minor simplification in svga_validate_surface_view()

2016-09-21 Thread Charmaine Lee

For the series, Reviewed-by: Charmaine Lee 


From: Brian Paul 
Sent: Wednesday, September 21, 2016 8:25 AM
To: mesa-dev@lists.freedesktop.org
Cc: Charmaine Lee
Subject: [PATCH 2/2] svga: minor simplification in svga_validate_surface_view()

Get rid of unneeded local var.
---
 src/gallium/drivers/svga/svga_surface.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_surface.c 
b/src/gallium/drivers/svga/svga_surface.c
index 42636bc..7cc7ef1 100644
--- a/src/gallium/drivers/svga/svga_surface.c
+++ b/src/gallium/drivers/svga/svga_surface.c
@@ -405,9 +405,9 @@ svga_validate_surface_view(struct svga_context *svga, 
struct svga_surface *s)
 {
enum pipe_error ret = PIPE_OK;
enum pipe_shader_type shader;
-   struct pipe_surface *surf = NULL;

assert(svga_have_vgpu10(svga));
+   assert(s);

SVGA_STATS_TIME_PUSH(svga_sws(svga),
 SVGA_STATS_TIME_VALIDATESURFACEVIEW);
@@ -481,12 +481,11 @@ svga_validate_surface_view(struct svga_context *svga, 
struct svga_surface *s)
  goto done;
   }
}
-   surf = >base;

 done:
SVGA_STATS_TIME_POP(svga_sws(svga));

-   return surf;
+   return >base;
 }


--
1.9.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/2] svga: minor simplification in svga_validate_surface_view()

2016-09-21 Thread Brian Paul
Get rid of unneeded local var.
---
 src/gallium/drivers/svga/svga_surface.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_surface.c 
b/src/gallium/drivers/svga/svga_surface.c
index 42636bc..7cc7ef1 100644
--- a/src/gallium/drivers/svga/svga_surface.c
+++ b/src/gallium/drivers/svga/svga_surface.c
@@ -405,9 +405,9 @@ svga_validate_surface_view(struct svga_context *svga, 
struct svga_surface *s)
 {
enum pipe_error ret = PIPE_OK;
enum pipe_shader_type shader;
-   struct pipe_surface *surf = NULL;
 
assert(svga_have_vgpu10(svga));
+   assert(s);
 
SVGA_STATS_TIME_PUSH(svga_sws(svga),
 SVGA_STATS_TIME_VALIDATESURFACEVIEW);
@@ -481,12 +481,11 @@ svga_validate_surface_view(struct svga_context *svga, 
struct svga_surface *s)
  goto done;
   }
}
-   surf = >base;

 done:
SVGA_STATS_TIME_POP(svga_sws(svga));
 
-   return surf;
+   return >base;
 }
 
 
-- 
1.9.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev