All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: fix simple_return.cocci warnings
       [not found] <201503052205.pdPgdu3L%fengguang.wu@intel.com>
@ 2015-03-05 14:03 ` kbuild test robot
  2015-03-05 15:30     ` Daniel Vetter
  0 siblings, 1 reply; 7+ messages in thread
From: kbuild test robot @ 2015-03-05 14:03 UTC (permalink / raw)
  To: Paulo Zanoni
  Cc: kbuild-all, Daniel Vetter, Rodrigo Vivi, Jani Nikula,
	David Airlie, intel-gfx, dri-devel, linux-kernel

drivers/gpu/drm/i915/intel_ringbuffer.c:435:1-4: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

CC: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 intel_ringbuffer.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -432,11 +432,7 @@ gen8_render_ring_flush(struct intel_engi
 			return ret;
 	}
 
-	ret = gen8_emit_pipe_control(ring, flags, scratch_addr);
-	if (ret)
-		return ret;
-
-	return 0;
+	return gen8_emit_pipe_control(ring, flags, scratch_addr);
 }
 
 static void ring_write_tail(struct intel_engine_cs *ring,

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

* Re: [PATCH] drm/i915: fix simple_return.cocci warnings
  2015-03-05 14:03 ` [PATCH] drm/i915: fix simple_return.cocci warnings kbuild test robot
@ 2015-03-05 15:30     ` Daniel Vetter
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2015-03-05 15:30 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Paulo Zanoni, kbuild-all, Daniel Vetter, Rodrigo Vivi,
	Jani Nikula, David Airlie, intel-gfx, dri-devel, linux-kernel

On Thu, Mar 05, 2015 at 10:03:08PM +0800, kbuild test robot wrote:
> drivers/gpu/drm/i915/intel_ringbuffer.c:435:1-4: WARNING: end returns can be simpified
> 
>  Simplify a trivial if-return sequence.  Possibly combine with a
>  preceding function call.
> Generated by: scripts/coccinelle/misc/simple_return.cocci
> 
> CC: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Queued for -next, thanks for the patch.
-Daniel

> ---
> 
>  intel_ringbuffer.c |    6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -432,11 +432,7 @@ gen8_render_ring_flush(struct intel_engi
>  			return ret;
>  	}
>  
> -	ret = gen8_emit_pipe_control(ring, flags, scratch_addr);
> -	if (ret)
> -		return ret;
> -
> -	return 0;
> +	return gen8_emit_pipe_control(ring, flags, scratch_addr);
>  }
>  
>  static void ring_write_tail(struct intel_engine_cs *ring,

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

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

* Re: [PATCH] drm/i915: fix simple_return.cocci warnings
@ 2015-03-05 15:30     ` Daniel Vetter
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2015-03-05 15:30 UTC (permalink / raw)
  To: kbuild test robot
  Cc: dri-devel, Paulo Zanoni, Daniel Vetter, intel-gfx, linux-kernel,
	kbuild-all, Rodrigo Vivi

On Thu, Mar 05, 2015 at 10:03:08PM +0800, kbuild test robot wrote:
> drivers/gpu/drm/i915/intel_ringbuffer.c:435:1-4: WARNING: end returns can be simpified
> 
>  Simplify a trivial if-return sequence.  Possibly combine with a
>  preceding function call.
> Generated by: scripts/coccinelle/misc/simple_return.cocci
> 
> CC: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Queued for -next, thanks for the patch.
-Daniel

> ---
> 
>  intel_ringbuffer.c |    6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -432,11 +432,7 @@ gen8_render_ring_flush(struct intel_engi
>  			return ret;
>  	}
>  
> -	ret = gen8_emit_pipe_control(ring, flags, scratch_addr);
> -	if (ret)
> -		return ret;
> -
> -	return 0;
> +	return gen8_emit_pipe_control(ring, flags, scratch_addr);
>  }
>  
>  static void ring_write_tail(struct intel_engine_cs *ring,

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/i915: fix simple_return.cocci warnings
  2015-03-27 11:26 ` kbuild test robot
@ 2015-03-27 13:49     ` Daniel Vetter
  2015-03-27 13:49     ` Daniel Vetter
  1 sibling, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2015-03-27 13:49 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Michel Thierry, kbuild-all, Daniel Vetter, Ben Widawsky,
	Jani Nikula, David Airlie, intel-gfx, dri-devel, linux-kernel

On Fri, Mar 27, 2015 at 07:26:35PM +0800, kbuild test robot wrote:
> drivers/gpu/drm/i915/i915_gem_gtt.c:1349:1-4: WARNING: end returns can be simpified and declaration on line 1347 can be dropped
> 
>  Simplify a trivial if-return sequence.  Possibly combine with a
>  preceding function call.
> Generated by: scripts/coccinelle/misc/simple_return.cocci
> 
> CC: Michel Thierry <michel.thierry@intel.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Queued for -next, thanks for the patch.
-Daniel

> ---
> 
>  i915_gem_gtt.c |    8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -1344,13 +1344,7 @@ err_out:
>  
>  static int gen6_ppgtt_alloc(struct i915_hw_ppgtt *ppgtt)
>  {
> -	int ret;
> -
> -	ret = gen6_ppgtt_allocate_page_directories(ppgtt);
> -	if (ret)
> -		return ret;
> -
> -	return 0;
> +	return gen6_ppgtt_allocate_page_directories(ppgtt);
>  }
>  
>  static void gen6_scratch_va_range(struct i915_hw_ppgtt *ppgtt,

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* Re: [PATCH] drm/i915: fix simple_return.cocci warnings
@ 2015-03-27 13:49     ` Daniel Vetter
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2015-03-27 13:49 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Ben Widawsky, dri-devel, Daniel Vetter, intel-gfx, linux-kernel,
	David Airlie, kbuild-all

On Fri, Mar 27, 2015 at 07:26:35PM +0800, kbuild test robot wrote:
> drivers/gpu/drm/i915/i915_gem_gtt.c:1349:1-4: WARNING: end returns can be simpified and declaration on line 1347 can be dropped
> 
>  Simplify a trivial if-return sequence.  Possibly combine with a
>  preceding function call.
> Generated by: scripts/coccinelle/misc/simple_return.cocci
> 
> CC: Michel Thierry <michel.thierry@intel.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Queued for -next, thanks for the patch.
-Daniel

> ---
> 
>  i915_gem_gtt.c |    8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -1344,13 +1344,7 @@ err_out:
>  
>  static int gen6_ppgtt_alloc(struct i915_hw_ppgtt *ppgtt)
>  {
> -	int ret;
> -
> -	ret = gen6_ppgtt_allocate_page_directories(ppgtt);
> -	if (ret)
> -		return ret;
> -
> -	return 0;
> +	return gen6_ppgtt_allocate_page_directories(ppgtt);
>  }
>  
>  static void gen6_scratch_va_range(struct i915_hw_ppgtt *ppgtt,

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: fix simple_return.cocci warnings
  2015-03-27 11:26 ` kbuild test robot
@ 2015-03-27 12:04   ` Michel Thierry
  2015-03-27 13:49     ` Daniel Vetter
  1 sibling, 0 replies; 7+ messages in thread
From: Michel Thierry @ 2015-03-27 12:04 UTC (permalink / raw)
  To: kbuild test robot; +Cc: intel-gfx

On 3/27/2015 11:26 AM, kbuild test robot wrote:
> drivers/gpu/drm/i915/i915_gem_gtt.c:1349:1-4: WARNING: end returns can be simpified and declaration on line 1347 can be dropped
>
>   Simplify a trivial if-return sequence.  Possibly combine with a
>   preceding function call.
> Generated by: scripts/coccinelle/misc/simple_return.cocci
>
> CC: Michel Thierry <michel.thierry@intel.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>
>   i915_gem_gtt.c |    8 +-------
>   1 file changed, 1 insertion(+), 7 deletions(-)
>
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -1344,13 +1344,7 @@ err_out:
>   
>   static int gen6_ppgtt_alloc(struct i915_hw_ppgtt *ppgtt)
>   {
> -	int ret;
> -
> -	ret = gen6_ppgtt_allocate_page_directories(ppgtt);
> -	if (ret)
> -		return ret;
> -
> -	return 0;
> +	return gen6_ppgtt_allocate_page_directories(ppgtt);
>   }
>   
>   static void gen6_scratch_va_range(struct i915_hw_ppgtt *ppgtt,

Thanks,

Reviewed-by: Michel Thierry <michel.thierry@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH] drm/i915: fix simple_return.cocci warnings
       [not found] <201503271934.hxMuVM63%fengguang.wu@intel.com>
@ 2015-03-27 11:26 ` kbuild test robot
  2015-03-27 12:04   ` Michel Thierry
  2015-03-27 13:49     ` Daniel Vetter
  0 siblings, 2 replies; 7+ messages in thread
From: kbuild test robot @ 2015-03-27 11:26 UTC (permalink / raw)
  To: Michel Thierry
  Cc: kbuild-all, Daniel Vetter, Ben Widawsky, Jani Nikula,
	David Airlie, intel-gfx, dri-devel, linux-kernel

drivers/gpu/drm/i915/i915_gem_gtt.c:1349:1-4: WARNING: end returns can be simpified and declaration on line 1347 can be dropped

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

CC: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 i915_gem_gtt.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -1344,13 +1344,7 @@ err_out:
 
 static int gen6_ppgtt_alloc(struct i915_hw_ppgtt *ppgtt)
 {
-	int ret;
-
-	ret = gen6_ppgtt_allocate_page_directories(ppgtt);
-	if (ret)
-		return ret;
-
-	return 0;
+	return gen6_ppgtt_allocate_page_directories(ppgtt);
 }
 
 static void gen6_scratch_va_range(struct i915_hw_ppgtt *ppgtt,

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

end of thread, other threads:[~2015-03-27 13:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <201503052205.pdPgdu3L%fengguang.wu@intel.com>
2015-03-05 14:03 ` [PATCH] drm/i915: fix simple_return.cocci warnings kbuild test robot
2015-03-05 15:30   ` Daniel Vetter
2015-03-05 15:30     ` Daniel Vetter
     [not found] <201503271934.hxMuVM63%fengguang.wu@intel.com>
2015-03-27 11:26 ` kbuild test robot
2015-03-27 12:04   ` Michel Thierry
2015-03-27 13:49   ` Daniel Vetter
2015-03-27 13:49     ` Daniel Vetter

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.