From patchwork Fri Sep 16 01:40:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 76346 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp248449qgf; Thu, 15 Sep 2016 18:40:05 -0700 (PDT) X-Received: by 10.98.106.65 with SMTP id f62mr19144436pfc.107.1473990005045; Thu, 15 Sep 2016 18:40:05 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 207si42297102pfx.121.2016.09.15.18.40.04; Thu, 15 Sep 2016 18:40:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755592AbcIPBju (ORCPT + 27 others); Thu, 15 Sep 2016 21:39:50 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:24791 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753174AbcIPBjs (ORCPT ); Thu, 15 Sep 2016 21:39:48 -0400 Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id u8G1cf4T008198; Fri, 16 Sep 2016 10:38:41 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com u8G1cf4T008198 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1473989922; bh=P+dzfDpy3wVZANd74TDnE0hcnvLXJpjlOYeJue87rc8=; h=From:To:Cc:Subject:Date:From; b=KFjh+pcaxFAauEubRy959J2du4SOurwg24h1fA6Mds8Dz8YzgmQFPNAiV06cy/tNS bSlKWeXeUvWUWi6c58m0HuwGbs3H+TfdpU/0w7/xVb4XnCvGXZyk3nQtl72S3+/Dvm Nvm8yy2ph5pv7XwYPUXeMtLAd1b0PxiBPrBB68OAmk4ubNoROpk8nJA7HQbI9a1Qrm /o0wu8wchw78OPUrwVpM1Zut/RHBZoKW2U4fyDiGS3fRRhmlRzyCcP7m3rsRqAt2TC 1TR1Op73DZnT/xaFssOjSZWDT0VEK23O+cOVq9ufoN0ckh/TOiC+tcRbdE0SNub2Mn wAb5Fypn3A1Wg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: dri-devel@lists.freedesktop.org, Sean Paul Cc: David Airlie , Christian K?nig , Jani Nikula , Alexander Deucher , Daniel Vetter , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH v3 5/5] drm/i915: squash lines for simple wrapper functions Date: Fri, 16 Sep 2016 10:40:23 +0900 Message-Id: <1473990023-17097-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada --- Changes in v3: - Keep the wrapper function. Cleanup of variables and assignments only. - Fix intel_engine_init_common() as well. drivers/gpu/drm/i915/i915_drv.c | 8 +------- drivers/gpu/drm/i915/intel_engine_cs.c | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) -- 1.9.1 diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 7f4e8ad..1503c88 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1324,13 +1324,7 @@ void i915_driver_unload(struct drm_device *dev) static int i915_driver_open(struct drm_device *dev, struct drm_file *file) { - int ret; - - ret = i915_gem_open(dev, file); - if (ret) - return ret; - - return 0; + return i915_gem_open(dev, file); } /** diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c index e405f10..ebb4bf8 100644 --- a/drivers/gpu/drm/i915/intel_engine_cs.c +++ b/drivers/gpu/drm/i915/intel_engine_cs.c @@ -298,13 +298,7 @@ static void intel_engine_cleanup_scratch(struct intel_engine_cs *engine) */ int intel_engine_init_common(struct intel_engine_cs *engine) { - int ret; - - ret = intel_engine_init_breadcrumbs(engine); - if (ret) - return ret; - - return 0; + return intel_engine_init_breadcrumbs(engine); } void intel_engine_reset_irq(struct intel_engine_cs *engine)