* [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 13:49 ` Daniel Vetter 0 siblings, 1 reply; 4+ 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] 4+ messages in thread
* Re: [PATCH] drm/i915: fix simple_return.cocci warnings 2015-03-27 11:26 ` [PATCH] drm/i915: fix simple_return.cocci warnings kbuild test robot @ 2015-03-27 13:49 ` Daniel Vetter 0 siblings, 0 replies; 4+ 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] 4+ messages in thread
[parent not found: <201503052205.pdPgdu3L%fengguang.wu@intel.com>]
* [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; 4+ 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] 4+ messages in thread
* Re: [PATCH] drm/i915: fix simple_return.cocci warnings 2015-03-05 14:03 ` kbuild test robot @ 2015-03-05 15:30 ` Daniel Vetter 0 siblings, 0 replies; 4+ 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] 4+ messages in thread
end of thread, other threads:[~2015-03-27 13:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <201503271934.hxMuVM63%fengguang.wu@intel.com>
2015-03-27 11:26 ` [PATCH] drm/i915: fix simple_return.cocci warnings kbuild test robot
2015-03-27 13:49 ` Daniel Vetter
[not found] <201503052205.pdPgdu3L%fengguang.wu@intel.com>
2015-03-05 14:03 ` kbuild test robot
2015-03-05 15:30 ` Daniel Vetter
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox