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: 9335313 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 005DA6077F for ; Fri, 16 Sep 2016 09:31:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E599F29EF1 for ; Fri, 16 Sep 2016 09:31:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D9FD629F0A; Fri, 16 Sep 2016 09:31:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CAE2929EF1 for ; Fri, 16 Sep 2016 09:31:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C08EC6E9D7; Fri, 16 Sep 2016 09:31:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from conuserg-12.nifty.com (conuserg-12.nifty.com [210.131.2.79]) by gabe.freedesktop.org (Postfix) with ESMTPS id 04A1C6E063; Fri, 16 Sep 2016 01:39:30 +0000 (UTC) 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 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 X-Mailman-Approved-At: Fri, 16 Sep 2016 09:31:08 +0000 Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Alexander Deucher , Daniel Vetter , Christian K?nig X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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)