From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753003AbbC0Nr2 (ORCPT ); Fri, 27 Mar 2015 09:47:28 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:35075 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752666AbbC0Nr0 (ORCPT ); Fri, 27 Mar 2015 09:47:26 -0400 Date: Fri, 27 Mar 2015 14:49:11 +0100 From: Daniel Vetter To: kbuild test robot Cc: Michel Thierry , kbuild-all@01.org, Daniel Vetter , Ben Widawsky , 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: <20150327134911.GU23521@phenom.ffwll.local> Mail-Followup-To: kbuild test robot , Michel Thierry , kbuild-all@01.org, Ben Widawsky , Jani Nikula , David Airlie , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <201503271934.hxMuVM63%fengguang.wu@intel.com> <20150327112635.GA178369@athens> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150327112635.GA178369@athens> X-Operating-System: Linux phenom 4.0.0-rc3+ 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 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 > Signed-off-by: Fengguang Wu 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