From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932920AbbCEP20 (ORCPT ); Thu, 5 Mar 2015 10:28:26 -0500 Received: from mail-we0-f177.google.com ([74.125.82.177]:34102 "EHLO mail-we0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932834AbbCEP2Y (ORCPT ); Thu, 5 Mar 2015 10:28:24 -0500 Date: Thu, 5 Mar 2015 16:30:00 +0100 From: Daniel Vetter To: kbuild test robot Cc: Paulo Zanoni , kbuild-all@01.org, Daniel Vetter , Rodrigo Vivi , Jani Nikula , David Airlie , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/i915: fix simple_return.cocci warnings Message-ID: <20150305153000.GK18775@phenom.ffwll.local> Mail-Followup-To: kbuild test robot , Paulo Zanoni , kbuild-all@01.org, Rodrigo Vivi , Jani Nikula , David Airlie , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <201503052205.pdPgdu3L%fengguang.wu@intel.com> <20150305140308.GA14261@waimea.lkp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150305140308.GA14261@waimea.lkp.intel.com> X-Operating-System: Linux phenom 3.16-2-amd64 User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Fengguang Wu 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