linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915/gvt: Clean up dead code in cmd_parser
@ 2017-10-15 22:32 Christos Gkekas
  2017-10-23 16:35 ` Zhi Wang
  0 siblings, 1 reply; 2+ messages in thread
From: Christos Gkekas @ 2017-10-15 22:32 UTC (permalink / raw)
  To: fred gao, Zhenyu Wang, Zhi Wang, Jani Nikula, Joonas Lahtinen,
	Rodrigo Vivi, David Airlie, intel-gvt-dev, intel-gfx, dri-devel,
	linux-kernel
  Cc: Christos Gkekas

Delete variables 'gma_bottom' that are set but never used.

Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
---
 drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c
index 2c0ccbb..d75ce70 100644
--- a/drivers/gpu/drm/i915/gvt/cmd_parser.c
+++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c
@@ -2511,7 +2511,7 @@ static int command_scan(struct parser_exec_state *s,
 
 static int scan_workload(struct intel_vgpu_workload *workload)
 {
-	unsigned long gma_head, gma_tail, gma_bottom;
+	unsigned long gma_head, gma_tail;
 	struct parser_exec_state s;
 	int ret = 0;
 
@@ -2521,7 +2521,6 @@ static int scan_workload(struct intel_vgpu_workload *workload)
 
 	gma_head = workload->rb_start + workload->rb_head;
 	gma_tail = workload->rb_start + workload->rb_tail;
-	gma_bottom = workload->rb_start +  _RING_CTL_BUF_SIZE(workload->rb_ctl);
 
 	s.buf_type = RING_BUFFER_INSTRUCTION;
 	s.buf_addr_type = GTT_BUFFER;
@@ -2557,7 +2556,7 @@ static int scan_workload(struct intel_vgpu_workload *workload)
 static int scan_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
 {
 
-	unsigned long gma_head, gma_tail, gma_bottom, ring_size, ring_tail;
+	unsigned long gma_head, gma_tail, ring_size, ring_tail;
 	struct parser_exec_state s;
 	int ret = 0;
 	struct intel_vgpu_workload *workload = container_of(wa_ctx,
@@ -2573,7 +2572,6 @@ static int scan_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
 			PAGE_SIZE);
 	gma_head = wa_ctx->indirect_ctx.guest_gma;
 	gma_tail = wa_ctx->indirect_ctx.guest_gma + ring_tail;
-	gma_bottom = wa_ctx->indirect_ctx.guest_gma + ring_size;
 
 	s.buf_type = RING_BUFFER_INSTRUCTION;
 	s.buf_addr_type = GTT_BUFFER;
-- 
2.7.4

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

* Re: [PATCH] drm/i915/gvt: Clean up dead code in cmd_parser
  2017-10-15 22:32 [PATCH] drm/i915/gvt: Clean up dead code in cmd_parser Christos Gkekas
@ 2017-10-23 16:35 ` Zhi Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Zhi Wang @ 2017-10-23 16:35 UTC (permalink / raw)
  To: Christos Gkekas, fred gao, Zhenyu Wang, Jani Nikula,
	Joonas Lahtinen, Rodrigo Vivi, David Airlie, intel-gvt-dev,
	intel-gfx, dri-devel, linux-kernel

Thanks, applied! :)

On 10/16/17 06:32, Christos Gkekas wrote:
> Delete variables 'gma_bottom' that are set but never used.
> 
> Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
> ---
>   drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c
> index 2c0ccbb..d75ce70 100644
> --- a/drivers/gpu/drm/i915/gvt/cmd_parser.c
> +++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c
> @@ -2511,7 +2511,7 @@ static int command_scan(struct parser_exec_state *s,
>   
>   static int scan_workload(struct intel_vgpu_workload *workload)
>   {
> -	unsigned long gma_head, gma_tail, gma_bottom;
> +	unsigned long gma_head, gma_tail;
>   	struct parser_exec_state s;
>   	int ret = 0;
>   
> @@ -2521,7 +2521,6 @@ static int scan_workload(struct intel_vgpu_workload *workload)
>   
>   	gma_head = workload->rb_start + workload->rb_head;
>   	gma_tail = workload->rb_start + workload->rb_tail;
> -	gma_bottom = workload->rb_start +  _RING_CTL_BUF_SIZE(workload->rb_ctl);
>   
>   	s.buf_type = RING_BUFFER_INSTRUCTION;
>   	s.buf_addr_type = GTT_BUFFER;
> @@ -2557,7 +2556,7 @@ static int scan_workload(struct intel_vgpu_workload *workload)
>   static int scan_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
>   {
>   
> -	unsigned long gma_head, gma_tail, gma_bottom, ring_size, ring_tail;
> +	unsigned long gma_head, gma_tail, ring_size, ring_tail;
>   	struct parser_exec_state s;
>   	int ret = 0;
>   	struct intel_vgpu_workload *workload = container_of(wa_ctx,
> @@ -2573,7 +2572,6 @@ static int scan_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
>   			PAGE_SIZE);
>   	gma_head = wa_ctx->indirect_ctx.guest_gma;
>   	gma_tail = wa_ctx->indirect_ctx.guest_gma + ring_tail;
> -	gma_bottom = wa_ctx->indirect_ctx.guest_gma + ring_size;
>   
>   	s.buf_type = RING_BUFFER_INSTRUCTION;
>   	s.buf_addr_type = GTT_BUFFER;
> 

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

end of thread, other threads:[~2017-10-23 16:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-15 22:32 [PATCH] drm/i915/gvt: Clean up dead code in cmd_parser Christos Gkekas
2017-10-23 16:35 ` Zhi Wang

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