From patchwork Wed Jul 17 13:07:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Egbert Eich X-Patchwork-Id: 2828601 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5BA119F967 for ; Wed, 17 Jul 2013 13:21:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4C351201CA for ; Wed, 17 Jul 2013 13:21:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 12458201C1 for ; Wed, 17 Jul 2013 13:21:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 10B9AE6F3A for ; Wed, 17 Jul 2013 06:21:57 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by gabe.freedesktop.org (Postfix) with ESMTP id D9CAFE5F0B for ; Wed, 17 Jul 2013 06:08:01 -0700 (PDT) Received: from debian (p5DCF2FCF.dip0.t-ipconnect.de [93.207.47.207]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0Mefts-1UoVFl3mB6-00OYMP; Wed, 17 Jul 2013 15:07:50 +0200 Received: from sles11.fritz.box (sles11.fritz.box [192.168.178.22]) by debian (Postfix) with ESMTP id 2964F13C7A; Wed, 17 Jul 2013 15:07:47 +0200 (CEST) From: Egbert Eich To: dri-devel@lists.freedesktop.org Subject: [PATCH 08/16] drm/mgag200: Simplify function mgag200_bo_unpin() Date: Wed, 17 Jul 2013 15:07:21 +0200 Message-Id: <1374066449-21714-9-git-send-email-eich@suse.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1374066449-21714-1-git-send-email-eich@suse.com> References: <1374066449-21714-1-git-send-email-eich@suse.com> X-Provags-ID: V02:K0:08M3JvS7Ewo9rGAmHgpYXjtpTD+frL6XExBkveuCPA3 8hacKKb9VN+xyeg23f3koYSBrLnuGiOiQxxEiheE2Mpar+QPG3 qChAgK5hFWD9Lxea1Wlqug2/ra1gJ/jAsUz9tvDYFT9Xc7eAEb 3iPlcap97iae29GZheqBzZx6PHJbvKvw6Tv2BDTKyXfJz3LDmF bBDbHmjVhvk3Kda/bytWHFyOE5Q3fIBPMraQqcdZEwNANeoglC ERKQLh6AvQFw3t12kCdnJNL7TyX6N2/E6ewSEjQa/9WIwkj1Tm 1PvEtxG0s80iWGHgc8Rw4snQnbk41cduZvvIOT0WYtFEvxukzj WrzqoDYED/JLeXWvn4VTppgtASdI3hpwhBi0FMCi6 Cc: Egbert Eich , Egbert Eich , Mathieu Larouche , Dave Airlie , Christopher Harvey X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Egbert Eich --- drivers/gpu/drm/mgag200/mgag200_ttm.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_ttm.c b/drivers/gpu/drm/mgag200/mgag200_ttm.c index 2606031..3a2e5e2 100644 --- a/drivers/gpu/drm/mgag200/mgag200_ttm.c +++ b/drivers/gpu/drm/mgag200/mgag200_ttm.c @@ -367,7 +367,7 @@ int mgag200_bo_pin(struct mgag200_bo *bo, u32 pl_flag, u64 *gpu_addr) int mgag200_bo_unpin(struct mgag200_bo *bo) { - int i, ret; + int i; if (!bo->pin_count) { DRM_ERROR("unpin bad %p\n", bo); return 0; @@ -378,11 +378,8 @@ int mgag200_bo_unpin(struct mgag200_bo *bo) for (i = 0; i < bo->placement.num_placement ; i++) bo->placements[i] &= ~TTM_PL_FLAG_NO_EVICT; - ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false); - if (ret) - return ret; - return 0; + return ttm_bo_validate(&bo->bo, &bo->placement, false, false); } int mgag200_bo_push_sysram(struct mgag200_bo *bo)